diff options
author | PleaseStand <pleasestand@live.com> | 2014-01-11 21:48:30 +0000 |
---|---|---|
committer | PleaseStand <pleasestand@live.com> | 2014-01-11 21:48:30 +0000 |
commit | cb77e59f7c9970eb4ad3dbf02d304ad9c2c10632 (patch) | |
tree | 1c4fe8896c6bc370a845c1593a941bd449e6df15 /tests/phpunit/data/autoloader | |
parent | c61fdb4ef5dbe0c26a17e57203e0bf99aa0e2440 (diff) | |
download | mediawikicore-cb77e59f7c9970eb4ad3dbf02d304ad9c2c10632.tar.gz mediawikicore-cb77e59f7c9970eb4ad3dbf02d304ad9c2c10632.zip |
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
Diffstat (limited to 'tests/phpunit/data/autoloader')
-rw-r--r-- | tests/phpunit/data/autoloader/TestAutoloadedAliasedClassNew.php | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/phpunit/data/autoloader/TestAutoloadedAliasedClassNew.php b/tests/phpunit/data/autoloader/TestAutoloadedAliasedClassNew.php deleted file mode 100644 index 5ce8483c89f3..000000000000 --- a/tests/phpunit/data/autoloader/TestAutoloadedAliasedClassNew.php +++ /dev/null @@ -1,4 +0,0 @@ -<?php - -class TestAutoloadedAliasedClassNew { -} |