#46867 [Bgs]: "use...as" not suppored by Reflection::export()
| From: | naturallydigital at yahoo dot com | Date: | Mon, 05 Jan 2009 07:18:57 +0000 |
| Subject: | #46867 [Bgs]: "use...as" not suppored by Reflection::export() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-132549@lists.php.net to get a copy of this message | ||
ID: 46867
User updated by: naturallydigital at yahoo dot com
Reported By: naturallydigital at yahoo dot com
Status: Bogus
Bug Type: Reflection related
Operating System: *
PHP Version: 5.3CVS-2008-12-15 (CVS)
New Comment:
class_alias() didn't appear in the official documentation
(http://wiki.php.net/doc/todo/undocumented). Thanks for pointing that
out.
Previous Comments:
------------------------------------------------------------------------
[2009-01-02 02:12:50] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
In strins you always have to use the fully qualified name - we don't
know where the string is coming from and the aliasing is done at compile
time,not runtime ...
------------------------------------------------------------------------
[2009-01-01 02:15:18] kalle@php.net
Should be same with class_alias(), I'm not sure if its intended for
Reflection to support aliased classes
------------------------------------------------------------------------
[2008-12-15 08:27:00] naturallydigital at yahoo dot com
Description:
------------
The Reflection API does not support the "use... as... " syntax for
namespaces in 5.3 CVS. I ran the raw unzipped Win32 VC6 snapshot from
snaps.php.net: "php -c php.ini-dist d:\reflect.php" (code below)
Reproduce code:
---------------
<?php
require_once("A\\B\\C.php");
use \A\B\C as D;
try
{
Reflection::export(new ReflectionClass('D'));
}
catch (Exception $e)
{
echo $e->getMessage();
}
?>
Expected result:
----------------
User class C (a.k.a. D) reflected in the Command Prompt window.
Actual result:
--------------
"Class D does not exist" output in the Command Prompt window.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46867&edit=1