From 56be92c27df29b7c03a16ec49d90ea7959313565 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Sat, 13 Jun 2026 12:49:22 +0200 Subject: [PATCH 1/3] CI: clone MediaWiki with git instead of wget+tar GitHub recently converted older MediaWiki release refs (REL1_39 through REL1_42, plus all old extension/skin branches down to REL1_20) from branches to tags, leaving both refs in place under the same name. The bare `archive/.tar.gz` URL form now returns HTTP 300 Multiple Choices for those names instead of a tarball: the given path has multiple possibilities: #, # The master matrix only covers REL1_43+ so this isn't surfacing today, but the bare URL form is a latent hazard as future versions move through the same conversion. Switching to `git clone --depth 1 --branch ` resolves either ref form transparently and is robust to whatever Wikimedia does with the refs next. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/installWiki.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/installWiki.sh b/.github/workflows/installWiki.sh index c69cc4d..593f76c 100644 --- a/.github/workflows/installWiki.sh +++ b/.github/workflows/installWiki.sh @@ -3,10 +3,7 @@ MW_BRANCH=$1 EXTENSION_NAME=$2 -wget https://github.com/wikimedia/mediawiki/archive/$MW_BRANCH.tar.gz -nv - -tar -zxf $MW_BRANCH.tar.gz -mv mediawiki-$MW_BRANCH mediawiki +git clone --depth 1 --branch ${MW_BRANCH} https://github.com/wikimedia/mediawiki.git mediawiki cd mediawiki From 8212c0d8928854b22c193df1c9b9cb0635aab4ed Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Sat, 13 Jun 2026 13:12:00 +0200 Subject: [PATCH 2/3] CI: add MediaWiki 1.46 and detect the PHPUnit runner MediaWiki 1.46 removed the tests/phpunit/phpunit.php legacy entry point in favour of vendor/bin/phpunit with phpunit.xml generated by composer phpunit:config. Detect which runner is available at the file-existence level instead of pinning on the MediaWiki version, matching the pattern already in use in Chameleon, Bootstrap, and BootstrapComponents. Promote REL1_46 to a non-experimental matrix row (it now passes with the new runner) and keep the master row to surface regressions early. Bump the MediaWiki cache key to -v2 so existing wget-era cache entries (which lack phpunit.xml.template because it is export-ignored from git archive output) do not satisfy the new code path on cache hits. Apply the bump to all three Cache MediaWiki invocations (PHPUnit, PHPStan, Psalm) so they continue to share a single MediaWiki cache per row. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/ci.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 680c8d6..2e40681 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,9 +24,9 @@ jobs: - mw: 'REL1_45' php: 8.3 experimental: false - - mw: 'master' + - mw: 'REL1_46' php: 8.4 - experimental: true + experimental: false - mw: 'master' php: 8.5 experimental: true @@ -53,7 +53,7 @@ jobs: mediawiki !mediawiki/extensions/ !mediawiki/vendor/ - key: mw_${{ matrix.mw }}-php${{ matrix.php }} + key: mw_${{ matrix.mw }}-php${{ matrix.php }}-v2 - name: Cache Composer cache uses: actions/cache@v4 @@ -78,7 +78,14 @@ jobs: run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader - name: Run PHPUnit - run: php tests/phpunit/phpunit.php -c vendor/mediawiki/scss + run: | + if [ -f tests/phpunit/phpunit.php ]; then + php tests/phpunit/phpunit.php -c vendor/mediawiki/scss + else + # MW 1.46 and later + composer phpunit:config + vendor/bin/phpunit vendor/mediawiki/scss/tests/phpunit + fi code-style: name: "Code style: MW ${{ matrix.mw }}, PHP ${{ matrix.php }}" @@ -137,7 +144,7 @@ jobs: mediawiki !mediawiki/extensions/ !mediawiki/vendor/ - key: mw_${{ matrix.mw }}-php${{ matrix.php }} + key: mw_${{ matrix.mw }}-php${{ matrix.php }}-v2 - name: Cache Composer cache uses: actions/cache@v4 @@ -198,7 +205,7 @@ jobs: mediawiki !mediawiki/extensions/ !mediawiki/vendor/ - key: mw_${{ matrix.mw }}-php${{ matrix.php }} + key: mw_${{ matrix.mw }}-php${{ matrix.php }}-v2 - name: Cache Composer cache uses: actions/cache@v4 From 70917fd9ed49995da1fa21d36e6d915a1b5a75e1 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Sat, 13 Jun 2026 13:19:18 +0200 Subject: [PATCH 3/3] CI: keep REL1_46 experimental scssphp v1.x (the line pinned at ^1.13.0) triggers PHP 8.4's "implicit nullable parameter" deprecation in ScssPhp\Compiler::multiplyMedia(), which the new PHPUnit runner converts to a test error in ResourceLoaderSCSSModuleTest::testGetStyles. This is unrelated to the CI install fix; it is a real PHP 8.4 compatibility gap in the scssphp v1.x line tracked by #31. Until that lands, keep REL1_46 experimental so CI remains useful. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e40681..db6d484 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: experimental: false - mw: 'REL1_46' php: 8.4 - experimental: false + experimental: true - mw: 'master' php: 8.5 experimental: true