Repository navigation
Fix CI PHPUnit library for WordPress branch builds - #1027
Merged
masteradhoc merged 1 commit intoOct 18, 2026
Merged
Conversation
wp-env loads the PHPUnit library from wordpress-develop trunk when the core version has an -alpha suffix, as on 7.1-branch (7.1.4-alpha). Trunk tests need WP_Secrets_Store, which 7.1 does not have, so the bootstrap fails. For -branch matrix legs, check out the matching wordpress-develop branch for the PHPUnit library.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
What?
Fixes the failing
wordpress/wordpress#7.1-branchtest jobs. For-branchmatrix legs, CI now checks out the matching wordpress-develop branch for the PHPUnit library.No issue. Split out of #997, as asked in review, so all PRs get the fix.
Why?
The
#7.1-branchjobs fail on master and on every open PR in the PHPUnit bootstrap:The core version on that branch is
7.1.4-alpha. When the version has an-alphasuffix, wp-env loads the PHPUnit library from wordpress-develop trunk. Trunk tests need the Secrets API, and 7.1 does not have it.How?
A new step in
.github/workflows/test.ymlruns only whenmatrix.wpends with-branch. It takes the branch name from the matrix value (for examplewordpress/wordpress#7.1-branchgives7.1), finds the wp-env PHPUnit checkout withnpm run env -- status --json, then fetches and checks out that wordpress-develop branch. Other matrix legs do not change.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus
Used for: Finding the cause and writing the workflow step. I reviewed and tested the change.
Testing Instructions
Test PHP 8.x (WP wordpress/wordpress#7.1-branch)jobs pass, and the bootstrap does not show theWP_Secrets_Storeerror.latest,wordpress/wordpress,6.8-branch,6.9-branchand7.0-branchjobs still pass.The same step was already tested on #997, where all matrix jobs passed.
Screenshots or screencast
#7.1-branchjobs fail withInterface "WP_Secrets_Store" not found.#7.1-branchjobs pass. CI only, no UI change.Changelog Entry
Development Update - Match the PHPUnit test library to the WordPress branch in CI.