Mechanism for renaming/aliasing classes
authorKevin Israel <pleasestand@live.com>
Fri, 22 Nov 2013 04:13:03 +0000 (23:13 -0500)
committerKevin Israel <pleasestand@live.com>
Mon, 6 Jan 2014 15:36:18 +0000 (10:36 -0500)
commitc61fdb4ef5dbe0c26a17e57203e0bf99aa0e2440
treef1dbbc2abfe3461e0be3d6e4680b4048e97bf78a
parent1e5e4d91e2f6e577e92f0ac18da3c83a9f5027ae
Mechanism for renaming/aliasing classes

Sometimes it is desirable to change a class name that is still referenced
in extensions or config files (e.g. for consistency, as in I507ba00a).
PHP's class_alias() function can help in preserving backward compatibility;
however, creating an alias first requires that the class be loaded.

Hence this is implemented in AutoLoader. Lazy loading continues to work,
the list of class names is still maintained in a central location, and
optionally, deprecation warnings can be generated.

Change-Id: I1d3fb04a448647b5be10bed7fec05238b9fc6fc7
includes/AutoLoader.php
tests/phpunit/data/autoloader/TestAutoloadedAliasedClassNew.php [new file with mode: 0644]
tests/phpunit/structure/AutoLoaderTest.php