- Mentioned In
- T55835: Provide a PSR-4 autoloader
rMW5b5b6974eb0d: composer.json: Set classmap-authoritative: true
T99865: Extension registration should support using a PSR-4 autoloader
rEDIV72856f022820: Rebuild composer autoloader
rMWVDb208abfd6ee5: Set classmap-authoritative: true
rOMWC0367b9073ec6: composer.json: Set classmap-authoritative: true
rMWVD7e92ce376c8b: Revert "Use classmap-authoritative setting"
rMWVDaa275e827461: Use classmap-authoritative setting
rCIPU8952c2862d48: Rebuild composer autoloader to support classmap-authoritative setting
T85737: Optimize Wikidata's Composer class loader impact
- Mentioned Here
- T73629: integration/phpunit has an older composer/ClassLoader.php that doesn't understand psr-4
@Legoktm I am reverting the class map authoritative patch because that breaks scap on beta cluster:
deployment-bastion$ mwscript mergeMessageFileList.php --wiki=eowiki --list-file="/srv/mediawiki-staging/wmf-config/extension-list" PHP Fatal error: Call to undefined method Composer\Autoload\ClassLoader::setClassMapAuthoritative() in /mnt/srv/mediawiki-staging/php-master/vendor/composer/autoload_real.php on line 41
Which breaks beta-scap-eqiad job.
This is similar to T73629: integration/phpunit has an older composer/ClassLoader.php that doesn't understand psr-4. The Composer\Autoload\ClassLoader class is common to all Composer-managed vendor collections. Each vendor ships one but only the first one that is loaded is used by the PHP/HHVM runtime. In this case the version of the class from multiversion is being invoked. So multiversion needs to be rebuilt with the latest Composer before we can use this feature. When that hurdle is cleared I'm pretty sure we will need to update the version of the class from integration/phpunit.
@Legoktm Do you have a checklist somewhere of the various Composer ClassLoader classes that we need to be sure are up to date?
Are there any left that we need to fix before trying to set "classmap-authoritative": true again?
Enabled it for Wikidata: https://github.com/wmde/WikidataBuildResources/commit/31c9cc34a9372cbb4f95989c5929ccdb4e6123f4 Build for beta with it: https://gerrit.wikimedia.org/r/#/c/203340/1