Edit report at https://bugs.php.net/bug.php?id=61759&edit=1
ID: 61759 Updated by: dmi...@php.net Reported by: ahar...@php.net Summary: class_alias() should accept classes with leading backslashes -Status: Closed +Status: Open Type: Feature/Change Request Package: Class/Object related Operating System: Irrelevant PHP Version: master-Git-2012-04-18 (Git) Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2013-08-29 07:19:56] dmi...@php.net Automatic comment on behalf of dmi...@zend.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=15694f66b2732962b760463803a68a1fa3bb098f Log: Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) ------------------------------------------------------------------------ [2013-08-29 07:19:54] dmi...@php.net Automatic comment on behalf of dmi...@zend.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=dfc6feb6e84f27094e6a2e3947caa094f7c35d26 Log: Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) ------------------------------------------------------------------------ [2013-08-27 12:55:41] contact at jubianchi dot fr Also agree with the fact that the leading backslashes are redundant but the point is that class_alias returns a value saying all went fine (bool(true)) when the alias is not reachable after the call. ------------------------------------------------------------------------ [2013-08-27 12:10:10] ni...@php.net I'm not convinced that allowing a leading \ is something we should strive towards. The \ is unnecessary and redundant (as string names are always fully qualified). I'd rather allow only the canonical form. ------------------------------------------------------------------------ [2013-08-27 12:04:43] jpa...@php.net Yep, let's start finding all places where classes as strings can be used, and patch them all to use zend_lookup_class(). There shouldn't be tons of them AFAIR. ------------------------------------------------------------------------ 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=61759 -- Edit this bug report at https://bugs.php.net/bug.php?id=61759&edit=1