Skip to content

Fix CI PHPUnit library for WordPress branch builds - #1027

Merged
masteradhoc merged 1 commit into
WordPress:masterfrom
faisalahammad:fix/ci-phpunit-lib-branch-match
Oct 18, 2026
Merged

masteradhoc merged 1 commit into
WordPress:masterfrom
faisalahammad:fix/ci-phpunit-lib-branch-match

Conversation

@faisalahammad

@faisalahammad faisalahammad commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What?

Fixes the failing wordpress/wordpress#7.1-branch test jobs. For -branch matrix 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-branch jobs fail on master and on every open PR in the PHPUnit bootstrap:

Interface "WP_Secrets_Store" not found

The core version on that branch is 7.1.4-alpha. When the version has an -alpha suffix, 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.yml runs only when matrix.wp ends with -branch. It takes the branch name from the matrix value (for example wordpress/wordpress#7.1-branch gives 7.1), finds the wp-env PHPUnit checkout with npm 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

  1. Check the CI run on this PR.
  2. The Test PHP 8.x (WP wordpress/wordpress#7.1-branch) jobs pass, and the bootstrap does not show the WP_Secrets_Store error.
  3. The latest, wordpress/wordpress, 6.8-branch, 6.9-branch and 7.0-branch jobs still pass.

The same step was already tested on #997, where all matrix jobs passed.

Screenshots or screencast

Before After
#7.1-branch jobs fail with Interface "WP_Secrets_Store" not found. #7.1-branch jobs pass. CI only, no UI change.

Changelog Entry

Development Update - Match the PHPUnit test library to the WordPress branch in CI.

Open WordPress Playground Preview

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.
@github-actions

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: faisalahammad <faisalahammad@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@masteradhoc masteradhoc self-assigned this Oct 18, 2026
@masteradhoc masteradhoc added this to the 0.18.0 milestone Oct 18, 2026
@masteradhoc
masteradhoc self-requested a review October 18, 2026 17:44

@masteradhoc masteradhoc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM!

@masteradhoc
masteradhoc merged commit 5c72d5e into WordPress:master Oct 18, 2026
36 checks passed
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