Repository navigation
Repair wp/5.8 branch Actions: Add wpop_keywords to the pattern directory test fixtures - #84458
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
fef5ed7 to
8903241
Compare
|
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. |
8903241 to
48a7f00
Compare
48a7f00 to
265f2af
Compare
265f2af to
0b54d2c
Compare
0b54d2c to
a2b74d6
Compare
a2b74d6 to
9e8b6ba
Compare
Part of #82935.
What?
Adds
"wpop_keywords": ""to themetaobject of every pattern in the four pattern directory test fixtures inphpunit/fixtures/rest-api/pattern-directory/(12 patterns), test fixtures only.Why?
The
PHP 8.0legs ofunit-test.yml(single site and multisite) report two errors:WordPress 5.8 ships
WP_REST_Pattern_Directory_Controller, so theclass_exists()guard inlib/load.phpskips Gutenberg's copy and these tests run against core's class. Core'sprepare_item_for_response()reads$raw_pattern->meta->wpop_keywords. Gutenberg's fixtures were written for its own copy of the controller, which readskeyword_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 towp/5.9's.wp/5.9's #84423 also removed theassertContains( 'core', … )loop fromtest_get_items_by_keyword(). That isn't needed here: on this branch the test is skipped withmarkTestSkipped()(along with most of this class's tests, since bad9073 (#32228)), so onlytest_prepare_item()andtest_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