https://bugzilla.wikimedia.org/show_bug.cgi?id=71629
Bug ID: 71629
Summary: integration/phpunit has an older
composer/ClassLoader.php that doesn't understand psr-4
Product: Wikimedia
Version: wmf-deployment
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Continuous integration
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Web browser: ---
Mobile Platform: ---
The wikimedia/iegreview project is using a PSR-4 autoloading scheme (just like
PSR-0 except you don't have to have a bunch of empty directories in your path
to define the full namespace).
The phpunit job for this repository is failing with this error:
PHP Fatal error: Call to undefined method
Composer\Autoload\ClassLoader::setPsr4() in
/srv/ssd/jenkins-slave/workspace/wikimedia-iegreview-phpunit/vendor/composer/autoload_real.php
on line 33
PHP Stack trace:
PHP 1. {main}()
/srv/deployment/integration/phpunit/vendor/phpunit/phpunit/composer/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main()
/srv/deployment/integration/phpunit/vendor/phpunit/phpunit/composer/bin/phpunit:63
PHP 3. PHPUnit_TextUI_Command->run()
/srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:129
PHP 4. PHPUnit_TextUI_Command->handleArguments()
/srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:138
PHP 5. PHPUnit_TextUI_Command->handleBootstrap()
/srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:606
PHP 6. PHPUnit_Util_Fileloader::checkAndLoad()
/srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:778
PHP 7. PHPUnit_Util_Fileloader::load()
/srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Util/Fileloader.php:76
PHP 8. include_once()
/srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Util/Fileloader.php:92
PHP 9. require()
/srv/ssd/jenkins-slave/workspace/wikimedia-iegreview-phpunit/tests/bootstrap.php:24
PHP 10. ComposerAutoloaderInit219a9bfa76f2ac9b53cf75ea98d99ffa::getLoader()
/srv/ssd/jenkins-slave/workspace/wikimedia-iegreview-phpunit/vendor/autoload.php:7
After a lot of head scratching I figured out that this is caused by the
vendor/composer/ClassLoader.php that is loaded from the integration/phpunit
project to run phpunit. This older version of the
\Composer\Autoload\ClassLoader class shadows the newer version present in
wikimedia/iegreview/vendor/composer/ClassLoader.php.
The fix for this should be as easy as regenerating the classloader for the
integration/phpunit project using a newer version of Composer that supports
PSR-4 autoloaders.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l