Req #52029 [Opn->Wfx]: create_alias namespaces
Edit report at https://bugs.php.net/bug.php?id=52029&edit=1
ID: 52029
Updated by: cmb@php.net
Reported by: rustyj4ck at gmail dot com
Summary: create_alias namespaces
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: Class/Object related
Operating System: all
PHP Version: 5.3.2
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
It seems to me that class_alias() has been introduced to provide a
way forward to use namespaced classes without breaking BC for
clients. This is now obsolete, so I don't think that adding
further support makes sense at this point in time.
Previous Comments:
------------------------------------------------------------------------
[2010-10-24 15:37:24] kalle@php.net
Sorry, shouldn't have been assigned to you Dmitry ;-)
------------------------------------------------------------------------
[2010-10-24 15:36:56] kalle@php.net
Moving this to a feature / change request
------------------------------------------------------------------------
[2010-06-15 12:41:49] rustyj4ck at gmail dot com
Then, where is expected functions?
is_alias()
get_alias_name()
or reflection method?
in fact we cant get alias name, aliasing is useless.
------------------------------------------------------------------------
[2010-06-15 09:48:06] dmitry@php.net
This is an expected behaviour. An alias allows to refer to a class entry using different name but
it's the same class entry.
------------------------------------------------------------------------
[2010-06-13 00:34:58] felipe@php.net
Hmm, in fact the alias is created by reusing the original class entry. I.e. no copy is done, it just
add a new entry to the class table using the alias name pointing to the original one.
class a { }
class_alias('a', 'b');
ReflectionClass::export('b');
/*
Class [ <user> class a ] {
...
}
*/
Dmitry, are actually the aliases supposed to behave in this way? (needing to be explained in the
documentation wether it is right as is)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=52029
--
Edit this bug report at https://bugs.php.net/bug.php?id=52029&edit=1
Thread (5 messages)