Revert "Mechanism for renaming/aliasing classes"
authorPleaseStand <pleasestand@live.com>
Sat, 11 Jan 2014 21:48:30 +0000 (21:48 +0000)
committerPleaseStand <pleasestand@live.com>
Sat, 11 Jan 2014 21:48:30 +0000 (21:48 +0000)
commitcb77e59f7c9970eb4ad3dbf02d304ad9c2c10632
tree1c4fe8896c6bc370a845c1593a941bd449e6df15
parentc61fdb4ef5dbe0c26a17e57203e0bf99aa0e2440
Revert "Mechanism for renaming/aliasing classes"

Seems good in theory, though not quite usable in practice.
As with subclassing, the aliases would not work reliably
for code that uses type hints and/or instanceof.

See <https://bugs.php.net/bug.php?id=61422>, which I was
previously unaware of.

The best alternative is to add class_alias() calls to the
class files themselves, as well as duplicate entries to the
AutoLoader (just like when multiple classes are in the same
file).

There is no good way to show deprecation warnings, which
likely would have to be implemented in PHP itself. For now,
renamed classes should be indicated in RELEASE-NOTES. Maybe
I will file an RfC (at <https://wiki.php.net/rfc>) for this
and related improvements (e.g. making class names case
sensitive).

This reverts commit c61fdb4ef5dbe0c26a17e57203e0bf99aa0e2440.

Change-Id: I9771b4239543b543cfa078f357db1cd3918f081e
includes/AutoLoader.php
tests/phpunit/data/autoloader/TestAutoloadedAliasedClassNew.php [deleted file]
tests/phpunit/structure/AutoLoaderTest.php