Commit 2e7ad4e
ci: bypass setup-php auto-written composer auth (workaround for malformed token)
Recent CI runs hit "Your github oauth token for github.com contains invalid
characters" intermittently — once on PHP 8.5/master (eb53350), once on PHP 7.4
on the refactor branch (5843b6e). Same error, different PHP version each time.
Root cause: shivammathur/setup-php@v2 writes ~/.composer/auth.json with
$GITHUB_TOKEN by default. GitHub Actions has been occasionally returning that
token with embedded newlines (visible in the log as multiline `***` mask),
which composer 2.10 rejects with the error above.
Fix: in the Linux install step, drop the auto-written auth.json and set
COMPOSER_AUTH='{}' so composer runs without a token. Our deps are all public
(packagist) so no auth is needed. Windows uses the system composer with a
different env so it has not hit this; leaving it untouched.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5843b6e commit 2e7ad4e
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
| |||
0 commit comments