Remove array_unique() on expected classes in checkAutoLoadConf()
authorAlangi Derick <alangiderick@gmail.com>
Wed, 7 Nov 2018 17:15:51 +0000 (18:15 +0100)
committerReedy <reedy@wikimedia.org>
Fri, 30 Nov 2018 00:22:06 +0000 (00:22 +0000)
commit8221a7a4f28c4af2d9417f0d42cc6177d6e8529f
tree9004ffb1404bc721f1c91ee67f396186e119ea47
parentf4e999b6a4e344d18313684f1a11713c224fd8f1
Remove array_unique() on expected classes in checkAutoLoadConf()

Sometimes classes can be loaded via autoload (PSR-4) and class_aliasing
and due to this calling array_unique() on expected classes will remove
one of these classes due to them sharing the same file (and array_unique()
works on array values).

Also allow for ::class suffixed classes to be namespaced (ie look for \
in the regexes)

Cleanup some of the regexes, remove redunant code (don't need multi cased
letters when we have /i), simplify them

Bug: T206728
Change-Id: I235274d579b1bfd12a448448ddf020546c9aa89b
tests/phpunit/structure/AutoLoaderStructureTest.php