Skip to content

Repair wp/5.8 branch Actions: Add wpop_keywords to the pattern directory test fixtures - #84458

Open
desrosj wants to merge 1 commit into
fix-actions-5.8/fix-edit-site-export-test-php-compatfrom
fix-actions-5.8/fix-pattern-directory-tests
Open

desrosj wants to merge 1 commit into
fix-actions-5.8/fix-edit-site-export-test-php-compatfrom
fix-actions-5.8/fix-pattern-directory-tests

Conversation

@desrosj

@desrosj desrosj commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Part of #82935.

What?

Adds "wpop_keywords": "" to the meta object of every pattern in the four pattern directory test fixtures in phpunit/fixtures/rest-api/pattern-directory/ (12 patterns), test fixtures only.

Why?

The PHP 8.0 legs of unit-test.yml (single site and multisite) report two errors:

1) WP_REST_Pattern_Directory_Controller_Test::test_prepare_item
Undefined property: stdClass::$wpop_keywords

2) WP_REST_Pattern_Directory_Controller_Test::test_prepare_item_search
Undefined property: stdClass::$wpop_keywords

WordPress 5.8 ships WP_REST_Pattern_Directory_Controller, so the class_exists() guard in lib/load.php skips Gutenberg's copy and these tests run against core's class. Core's prepare_item_for_response() reads $raw_pattern->meta->wpop_keywords. Gutenberg's fixtures were written for its own copy of the controller, which reads keyword_slugs, so they don't have that field. On PHP 7 the missing property is a notice that doesn't fail these jobs; on PHP 8 it is a warning, which PHPUnit converts to an error.

How?

Same change as wp/5.9's #84423; the four fixtures are now byte-identical to wp/5.9's.

wp/5.9's #84423 also removed the assertContains( 'core', … ) loop from test_get_items_by_keyword(). That isn't needed here: on this branch the test is skipped with markTestSkipped() (along with most of this class's tests, since bad9073 (#32228)), so only test_prepare_item() and test_prepare_item_search() load these fixtures.

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

🤖 Generated with Claude Code

@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 9, 2026
@desrosj desrosj self-assigned this Oct 9, 2026
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1cf620b9-01e5-4d53-a1b2-4f3169ee2356

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@desrosj
desrosj added this pull request to stack #84460 October 9, 2026 18:29
@desrosj
desrosj removed this pull request from stack #84460 October 10, 2026 00:22
@desrosj
desrosj changed the base branch from fix-actions-5.8/fix-edit-site-export-test-php-compat to wp/5.8 October 10, 2026 00:23
@desrosj
desrosj force-pushed the fix-actions-5.8/fix-pattern-directory-tests branch from fef5ed7 to 8903241 Compare October 10, 2026 00:24
@desrosj
desrosj changed the base branch from wp/5.8 to fix-actions-5.8/fix-edit-site-export-test-php-compat October 10, 2026 00:27
@desrosj
desrosj added this pull request to stack #84492 October 10, 2026 00:27
@desrosj
desrosj marked this pull request as ready for review October 13, 2026 01:12
@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: desrosj <desrosj@git.wordpress.org>

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

@desrosj
desrosj removed this pull request from stack #84492 October 16, 2026 01:21
@desrosj
desrosj force-pushed the fix-actions-5.8/fix-pattern-directory-tests branch from 8903241 to 48a7f00 Compare October 16, 2026 01:21
@desrosj
desrosj added this pull request to stack #84874 October 16, 2026 01:21
@desrosj
desrosj removed this pull request from stack #84874 October 16, 2026 15:49
@desrosj
desrosj force-pushed the fix-actions-5.8/fix-pattern-directory-tests branch from 48a7f00 to 265f2af Compare October 16, 2026 15:49
@desrosj
desrosj added this pull request to stack #84943 October 16, 2026 15:50
@desrosj
desrosj force-pushed the fix-actions-5.8/fix-pattern-directory-tests branch from 265f2af to 0b54d2c Compare October 19, 2026 17:09
@desrosj
desrosj removed this pull request from stack #84943 October 21, 2026 19:47
@desrosj
desrosj added this pull request to stack #85352 October 21, 2026 19:48
@desrosj
desrosj force-pushed the fix-actions-5.8/fix-pattern-directory-tests branch from 0b54d2c to a2b74d6 Compare October 22, 2026 18:35
@desrosj
desrosj force-pushed the fix-actions-5.8/fix-pattern-directory-tests branch from a2b74d6 to 9e8b6ba Compare October 23, 2026 13:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant