CI: switch the install script to git clone#41
Merged
Conversation
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 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 <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>
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 tracked by #31. Until that lands, keep REL1_46 experimental so CI remains useful. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
124f0d0 to
70917fd
Compare
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.
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 cloneWikimedia 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.gzURL form in that state, and returns an HTTP 300 Multiple Choices with a 105-byte body:Switching
installWiki.shtogit 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.phplegacy entry point in favour ofvendor/bin/phpunitwithphpunit.xmlgenerated bycomposer 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
-v2Existing wget-era cache entries lack
phpunit.xml.templatebecause they were populated from the archive tarball (the file isexport-ignored fromgit archive). Without a cache key bump, on every cache hit after merge the file would be absent andcomposer phpunit:configwould fail. Bump to-v2so the next run produces a fresh entry from thegit clonepath 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) becausescssphp/scssphpv1.x (the line pinned at^1.13.0) triggers PHP 8.4's "implicit nullable parameter" deprecation inCompiler::multiplyMedia(), which the new PHPUnit runner converts to a test error. This is a real PHP 8.4 compatibility gap inscssphpv1.x and is tracked separately by #31 ("Make compatible with scssphp 2.x"). Until that lands, REL1_46 is marked experimental so CI remains useful.