Skip to content

Commit 36beb37

Browse files
malbertsclaude
andcommitted
Fix PHPUnit invocation for MW master compatibility
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>
1 parent 7563280 commit 36beb37

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,21 @@ jobs:
8080
- name: Composer update
8181
run: composer update
8282

83-
- name: Run PHPUnit
83+
# "master" currently tracks MW >= 1.46, where tests/phpunit/phpunit.php
84+
# was removed. Once REL1_46 lands in the matrix, it needs the master
85+
# invocation below as well.
86+
- name: Run PHPUnit (MW < master)
87+
if: matrix.mw != 'master'
8488
run: php tests/phpunit/phpunit.php -c extensions/Bootstrap/
89+
90+
- name: Run PHPUnit (MW master)
91+
if: matrix.mw == 'master'
92+
run: |
93+
# TODO: phpunit.xml.template is export-ignored from GitHub's tarball
94+
# archive, so we fetch it separately. Remove this once installWiki.sh
95+
# switches to `git clone`, or MW drops the export-ignore.
96+
if [ ! -f phpunit.xml.template ]; then
97+
wget -q -O phpunit.xml.template "https://raw.githubusercontent.com/wikimedia/mediawiki/${{ matrix.mw }}/phpunit.xml.template"
98+
fi
99+
composer phpunit:config
100+
vendor/bin/phpunit -c extensions/Bootstrap/

0 commit comments

Comments
 (0)