CI: Pin shivammathur/setup-php before broken GitHub auth fix#7792
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Adds a step to clear the Composer GitHub OAuth token after shivammathur/setup-php@v2 in the SSR CI job, fixing a failure where Composer rejects the GITHUB_TOKEN as having invalid characters.
- Add
Remove Composer GitHub authstep — runscomposer config -g --unset github-oauth.github.com || trueimmediately after PHP setup to preventphp-package.test.tsfrom failing on a corrupt token.
Kimi K2 | 𝕏
shivammathur/setup-php@v2 received a security patch on May 13 (GHSA-f9f8-rm49-7jv2) that changed how Composer GitHub auth is handled, which broke Composer token handling and caused the PHP package tests to fail with 'invalid characters' errors. Pin to ac9c9532 (the last commit before that change). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9ea5bcf to
1d7d6f5
Compare
Avoid setup-php writing GitHub Actions tokens into Composer auth. The PHP package tests use bundled composer.phar versions, which then reject the masked ghs token from auth.json. Keep setup-php on v2 and skip its default Composer setup.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

Problem
The "SSR + Monorepo checks" CI job was consistently failing in the
php-package.test.tstest with:Root Cause
shivammathur/setup-php@v2is a floating tag. On May 13 2026, it received security patch GHSA-f9f8-rm49-7jv2 ("Fix GitHub auth handling for composer in affected versions") which changed how the Composer GitHub OAuth token is configured. The new behavior sets the token in a way that Composer rejects as having invalid characters.Fix
Pin
shivammathur/setup-phpto commitac9c9532— the last commit before that security patch was applied.