Skip to content

CI: switch the install script to git clone#42

Closed
malberts wants to merge 3 commits into
v5from
ci/install-modernize-v5
Closed

CI: switch the install script to git clone#42
malberts wants to merge 3 commits into
v5from
ci/install-modernize-v5

Conversation

@malberts

@malberts malberts commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Mirrors the equivalent change being applied to the master branch. master and v5 are essentially lockstep; CI changes need to land on both. The composer.json codesniffer pin difference is preserved (intentional LTS-vs-current divergence).

Originally an install-script bitrot fix; expanded scope to also bring the matrix and PHPUnit invocation in line with Chameleon, Bootstrap, and BootstrapComponents.

Switch the install script to git clone

Wikimedia recently converted older MediaWiki release refs (REL1_39 through REL1_42, plus older extension/skin branches) from branches to tags. The original branch refs still exist for now, so the same names resolve as both a branch AND a tag. GitHub's archive endpoint can no longer disambiguate the bare archive/<name>.tar.gz URL form in that state, and returns an HTTP 300 Multiple Choices with a 105-byte body:

the given path has multiple possibilities: #Git::Ref:..., #Git::Ref:...

Switching installWiki.sh to git clone --depth 1 --branch <name> resolves whichever ref form exists and is robust to whatever Wikimedia does with the refs next.

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.

Bump the MediaWiki cache key to -v2

Existing wget-era cache entries lack phpunit.xml.template because they were populated from the archive tarball (the file is export-ignored from git archive). Without a cache key bump, on every cache hit after merge the file would be absent and composer phpunit:config would fail. Bump to -v2 so the next run produces a fresh entry from the git clone path with the file included. Apply to all three Cache MediaWiki invocations so PHPUnit/PHPStan/Psalm keep sharing a single cache per row.

Keep REL1_46 experimental until scssphp gets a PHP 8.4 fix

REL1_46 on PHP 8.4 fails one test (ResourceLoaderSCSSModuleTest::testGetStyles) because scssphp/scssphp v1.x (the line pinned at ^1.13.0) triggers PHP 8.4's "implicit nullable parameter" deprecation in Compiler::multiplyMedia(), which the new PHPUnit runner converts to a test error. This is a real PHP 8.4 compatibility gap in scssphp v1.x and is separately worth a follow-up evaluating migration to scssphp v2.x. Until that lands, REL1_46 is marked experimental so CI remains useful.

fail-fast is also dropped on the PHPUnit matrix so each row reports its own result, instead of masking the green REL1_43/1.44/1.45 rows behind cancellation triggered by the failing experimental row.

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/<name>.tar.gz` URL form now returns HTTP 300 Multiple
Choices for those names instead of a tarball:

  the given path has multiple possibilities:
    #<Git::Ref:...>, #<Git::Ref:...>

The 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 <name>`
resolves either ref form transparently and is robust to whatever
Wikimedia does with the refs next.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@malberts malberts marked this pull request as ready for review June 13, 2026 11:04
malberts and others added 2 commits June 13, 2026 13:12
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 <noreply@anthropic.com>
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, separately worth a follow-up to evaluate migrating to
scssphp v2.x. Until that lands, keep REL1_46 experimental so CI
remains useful.

Drop fail-fast on the PHPUnit matrix so each row reports its own
result, instead of masking the REL1_43/1.44/1.45 passes behind
cancellation triggered when the REL1_46 row errors.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@malberts malberts deleted the branch v5 June 13, 2026 11:32
@malberts malberts closed this Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant