From eb1f37bcfc032b307d2a1651d63eab5cec1945b1 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Tue, 12 May 2026 19:28:20 -0400 Subject: [PATCH 1/2] Work around new GitHub token format breaking Composer --- .github/workflows/tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e83a49246..a2334a371d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -75,6 +75,15 @@ jobs: ini-values: short_open_tag=on coverage: none + # Workaround for new GitHub token format breaking Composer 2.9.7's token + # regex (composer/composer#12849). shivammathur/setup-php writes the + # GITHUB_TOKEN into Composer's global auth.json; remove it so Composer + # never tries to validate it. + - name: Remove Composer github-oauth credentials + if: steps.should-run-tests.outputs.result == 'true' + shell: bash + run: rm -f ~/.composer/auth.json ~/.config/composer/auth.json "$APPDATA/Composer/auth.json" + - name: Install dependencies uses: nick-invision/retry@v3 if: steps.should-run-tests.outputs.result == 'true' From 77dc5ef9382ca40e77719f7d0d8424b90164b00a Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Tue, 12 May 2026 23:15:46 -0400 Subject: [PATCH 2/2] Use empty github-token on setup-php instead of removing auth.json --- .github/workflows/tests.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a2334a371d..160374c4f2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -74,15 +74,10 @@ jobs: extensions: fileinfo, exif, gd, pdo, sqlite, pdo_sqlite ini-values: short_open_tag=on coverage: none - - # Workaround for new GitHub token format breaking Composer 2.9.7's token - # regex (composer/composer#12849). shivammathur/setup-php writes the - # GITHUB_TOKEN into Composer's global auth.json; remove it so Composer - # never tries to validate it. - - name: Remove Composer github-oauth credentials - if: steps.should-run-tests.outputs.result == 'true' - shell: bash - run: rm -f ~/.composer/auth.json ~/.config/composer/auth.json "$APPDATA/Composer/auth.json" + # Pass an empty token so setup-php doesn't write GITHUB_TOKEN into + # Composer's auth config. Composer 2.9.7's regex rejects the new + # GITHUB_TOKEN format (composer/composer#12849). + github-token: '' - name: Install dependencies uses: nick-invision/retry@v3