Fix PHPUnit invocation for MW master compatibility#89
Merged
Conversation
MediaWiki master removed tests/phpunit/phpunit.php in January 2026 (commit 80e3b20a). Branch on the matrix entry so the existing invocation continues to work for REL1_43 through REL1_45, while master uses the generated-config + vendor/bin/phpunit flow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous -c extensions/Bootstrap/ flag made PHPUnit load Bootstrap's phpunit.xml.dist, which has no bootstrap directive, so MediaWiki was never initialised and $GLOBALS['wgResourceModules'] was undefined when BootstrapManagerTest read it. Drop -c so MW's generated phpunit.xml (which wires up tests/phpunit/bootstrap.php) is used, and filter to Bootstrap tests via their @group annotation. Mirrors the Chameleon CI pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/phpunit/phpunit.phpalong withsuite.xmland its dedicated bootstrap (T395470, Gerrit I03f0b4ec, MW 1.46-wmf.14). Consumers must now usecomposer phpunit/vendor/bin/phpunit. This caused theMW masterjobs to fail withCould not open input file: tests/phpunit/phpunit.php.php tests/phpunit/phpunit.php -c extensions/Bootstrap/invocation; master generatesphpunit.xmlfrom the upstream template and runsvendor/bin/phpunit --group extension-bootstrap.--groupfilter (vs.-c extensions/Bootstrap/) is required on master because-coverrides the generated config, including itsbootstrap="tests/phpunit/bootstrap.php"attribute. Without that bootstrap, MW globals like$wgResourceModulesare never defined andBootstrapManagerTesterrors out.Test plan
🤖 Generated with Claude Code