Skip to content

[6.x] Work around new GitHub token format breaking CI#14659

Merged
jasonvarga merged 2 commits into
6.xfrom
gh-actions-token-error
May 13, 2026
Merged

[6.x] Work around new GitHub token format breaking CI#14659
jasonvarga merged 2 commits into
6.xfrom
gh-actions-token-error

Conversation

@jasonvarga
Copy link
Copy Markdown
Member

@jasonvarga jasonvarga commented May 12, 2026

GitHub started rolling out a new installation token format on 2026-04-27 (see changelog). The new ghs_APPID_JWT token contains base64url characters, including -. Composer 2.9.7's token validation regex (^[.A-Za-z0-9_]+$ in BaseIO.php) does not allow -, so the auto-set GITHUB_TOKEN now sporadically fails the composer require step with:

Your github oauth token for github.com contains invalid characters: "***"

Upstream issue: composer/composer#12849.

Passing an empty github-token to shivammathur/setup-php stops it from writing GITHUB_TOKEN into Composer's auth config, so Composer never sees the new-format token. Composer will fall back to unauthenticated GitHub API calls during dependency resolution, which is fine for our public-only dependency graph.

Once Composer ships a patched release, we can revert this.

@jasonvarga jasonvarga merged commit 236c887 into 6.x May 13, 2026
20 checks passed
@duncanmcclean
Copy link
Copy Markdown
Member

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.

2 participants