Fix Plugin Check CI: remove stored Composer credential, bump plugin-check-action - #766
Open
ilicfilip wants to merge 1 commit into
Open
Fix Plugin Check CI: remove stored Composer credential, bump plugin-check-action#766ilicfilip wants to merge 1 commit into
ilicfilip wants to merge 1 commit into
Conversation
Contributor
|
Test on Playground |
Contributor
✅ Code Coverage Report
🎉 Great job maintaining/improving code coverage! ℹ️ About this report
|
ilicfilip
added a commit
that referenced
this pull request
Aug 14, 2026
Two independent upstream breakages stack in this job: 1. `wp package install` fails with "Your github oauth token for github.com contains invalid characters". The stable WP-CLI phar bundles an old Composer that rejects the current GitHub Actions token format (hyphens) — composer#12076. setup-php exports the token via COMPOSER_AUTH, so pinning setup-php or clearing GITHUB_TOKEN does not help (both were tried in #766 and failed). The nightly phar bundles a Composer with relaxed validation, which fixed this step in #766. 2. The plugin check step then failed with "Environment not initialized. Run `wp-env start` first." plugin-check-action generated a .wp-env.json that loaded plugin-check from a download URL; on newer runner images wp-env exits 0 without initializing. #766 worked around it by pinning @wordpress/env to 11.5.0, which did not work and left that PR blocked. Upstream fixed (2) in plugin-check-action v1.1.7, so no @wordpress/env pin is needed — pinning to 11.5.0 against a fixed action would be counterproductive. v1.1.9 also picks up the v1.1.8 bundle-regression fix. Ref: WordPress/plugin-check-action#590 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ilicfilip
added a commit
that referenced
this pull request
Aug 14, 2026
… WP-CLI
Reverts the WP-CLI nightly step added in the previous commit and documents
why the surrounding pins exist.
The nightly was a May workaround for Composer rejecting the GitHub Actions
token ("contains invalid characters", composer#12076). Two things changed:
- composer#12076 was fixed in Composer 2.10.0 (2026-05-28, one day after
that debugging session) and setup-php now ships 2.10.2, so the stable
WP-CLI phar no longer hits the token error. Confirmed on CI run
31781466704: Composer reached dependency resolution, no token error.
- The nightly has since become wp-cli 3.0.0-alpha, and every released
dist-archive-command requires wp-cli ^2 / ^2.13, so `wp package install`
can no longer resolve against it. The nightly is now a dead end.
dist-archive-command stays on v3.1.0: it is the newest release accepting
wp-cli ^2. v3.2.x needs ^2.13, which has no stable release (latest is
2.12.0).
The remaining real fix is the action bump. v1.1.7 fixed the wp-env
silent-startup failure ("Environment not initialized") that blocked #766;
v1.1.9 picks up the v1.1.8 bundle-regression fix. Since that landed
upstream, the @wordpress/env 11.5.0 pin from #766 is not carried over.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…o v1.1.9 Replaces this branch's earlier attempts, all of which were dead ends: setup-php pinning, unsetting GITHUB_TOKEN, the WP-CLI nightly, and the @wordpress/env 11.5.0 pin. Two independent breakages: 1. "Your github oauth token for github.com contains invalid characters". This is INTERMITTENT — setup-php stores the run's ephemeral Actions token in ~/.composer/auth.json as a github-oauth credential, and Composer rejects it only when that particular token contains a character its validator dislikes (composer#12076). Roughly half of runs failed, which is why every previous "fix" appeared to work and then regressed: a single green run proves nothing here. Verified in run 31784727273 that GITHUB_TOKEN and COMPOSER_AUTH are already EMPTY at that point and the credential lives on disk, so clearing env vars cannot help. dist-archive-command is a public package needing no auth, so the fix is to delete the stored credential. Note the WP-CLI nightly used earlier is now actively harmful: it reports as wp-cli 3.0.0-alpha, while every released dist-archive-command requires wp-cli ^2 / ^2.13, so `wp package install` cannot resolve against it. 2. "Environment not initialized. Run `wp-env start` first." — fixed upstream in plugin-check-action v1.1.7 (WordPress/plugin-check-action#590); v1.1.9 also picks up the v1.1.8 bundle-regression fix. Since that landed upstream, the @wordpress/env 11.5.0 pin is dropped rather than carried forward. dist-archive-command stays at v3.1.0: newest release accepting wp-cli ^2. v3.2.x requires ^2.13, which has no stable release (latest is 2.12.0). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ilicfilip
force-pushed
the
filip/pin-setup-php-plugin-check
branch
from
August 14, 2026 08:55
3f83a1a to
59679c8
Compare
Contributor
🔍 WordPress Plugin Check Report
📊 Report
❌ Errors (1)📁 readme.txt (1 error)
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
232 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://wpvip.com/documentation/performance-improvements-by-removing-usage-of-post__not_in/ for more information. |
377 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://wpvip.com/documentation/performance-improvements-by-removing-usage-of-post__not_in/ for more information. |
381 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://wpvip.com/documentation/performance-improvements-by-removing-usage-of-post__not_in/ for more information. |
388 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://wpvip.com/documentation/performance-improvements-by-removing-usage-of-post__not_in/ for more information. |
📁 classes/suggested-tasks/data-collector/class-unpublished-content.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
103 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://wpvip.com/documentation/performance-improvements-by-removing-usage-of-post__not_in/ for more information. |
📁 classes/activities/class-query.php (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
71 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $table_name used in $wpdb->query()\n$table_name assigned unsafely at line 58. |
163 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $where_args used in $wpdb->get_results()\n$where_args assigned unsafely at line 153. |
📁 classes/suggested-tasks/data-collector/class-yoast-orphaned-content.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
111 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_row()\n$query assigned unsafely at line 98. |
📁 classes/suggested-tasks/data-collector/class-terms-without-posts.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
120 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 118. |
📁 classes/suggested-tasks/data-collector/class-terms-without-description.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
108 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 106. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
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.
Fixes the Plugin Check job, which has been failing on and off since May.
Branch reset onto current
developand reduced to one commit — the earlierattempts here (setup-php pin, unsetting
GITHUB_TOKEN, the WP-CLI nightly, the@wordpress/env11.5.0 pin) were all dead ends and have been dropped.The bug is intermittent — that's why it kept "coming back"
setup-phpstores the run's ephemeral Actions token in~/.composer/auth.jsonas a
github-oauthcredential. Composer rejects it withbut only when that particular token happens to contain a character its
validator dislikes (composer#12076).
Roughly half of all runs failed.
That intermittency is the reason every previous fix looked like it worked and
then regressed — a green run proves nothing here. Demonstrated by re-running an
unchanged commit and watching it flip from pass to fail.
The fix
dist-archive-commandis a public package and needs no auth at all, so thecredential is simply removed before installing:
Run
31784727273confirms the mechanism:GITHUB_TOKENandCOMPOSER_AUTHare already empty at that point, and the token is in
/home/runner/.composer/auth.json. That is why clearing env vars — the approachtried previously on this branch — could never work.
Second, separate breakage
Environment not initialized. Run 'wp-env start' first.— fixed upstream inplugin-check-action v1.1.7
(#590); this bumps
to v1.1.9, which also picks up the v1.1.8 bundle-regression fix. Since the
fix landed upstream, the
@wordpress/env11.5.0 pin is dropped rather thancarried forward.
Two pins that look stale but are load-bearing
wp-cli 3.0.0-alpha, while every releaseddist-archive-commandrequireswp-cli ^2/
^2.13—wp package installcannot resolve against it.dist-archive-commandstays at v3.1.0 — newest release acceptingwp-cli ^2. v3.2.x needs^2.13, which has no stable release (latest is 2.12.0).Both are documented in workflow comments so they aren't "modernized" back into
breakage.
Verification
Green run with this exact workflow: 31784727273
(install, build, and plugin check all pass).
Because the failure is token-dependent, treat an occasional red run as a signal
to re-read the mechanism above rather than as proof this regressed.
The same fix is also present in #767; this PR exists so
developgets itwithout waiting on that draft feature branch. Whichever merges first, the other
becomes a no-op.