registration: Initialize PSR-4 namespaces at same stage as normal autoloader
authorAntoine Musso <hashar@free.fr>
Wed, 30 May 2018 19:02:46 +0000 (21:02 +0200)
committerKunal Mehta <legoktm@member.fsf.org>
Wed, 30 May 2018 20:07:42 +0000 (13:07 -0700)
commit224864ebddab2e448f9ae4f247b85c652d9df42e
tree84fe22a6ea66849eae64c82400d974e6e1eede4d
parent0a6eedc440d7eca5fc342c7792b43c2471e83ece
registration: Initialize PSR-4 namespaces at same stage as normal autoloader

readFromQueue() injects the content of AutoloadClasses to
$wgAutoloadClasses however it missed doing the same for
AutoloadNamespaces.

When using the installer with an extension having AutoloadNamespaces
set, its classes would not be found.

Make ExtensionRegistry append to AutoLoader::$psr4Namespaces, and add
a test to cover the new behavior.

Bug: T195783
Change-Id: Id61155867a4ca7d9bc4a347f8671da74b0fa490b
includes/registration/ExtensionRegistry.php
tests/phpunit/data/registration/autoload_namespaces.json [new file with mode: 0644]
tests/phpunit/includes/registration/ExtensionRegistryTest.php