Repository navigation
Repair wp/6.0 branch Actions: Initialize WP_Block_Supports::$block_to_render in block render tests - #84286
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 |
|
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. |
4204f91 to
a9fdaf5
Compare
a9fdaf5 to
1a28a4d
Compare
|
Size Change: 0 B Total Size: 1.23 MB ℹ️ View Unchanged
|
1a28a4d to
67b3008
Compare
|
Size Change: 0 B Total Size: 1.23 MB ℹ️ View Unchanged
|
67b3008 to
07774e7
Compare
07774e7 to
aefef96
Compare
Part of #82933.
What?
Tests_Blocks_RenderLastPosts(phpunit/blocks/render-last-posts-test.php) andBlock_Library_Navigation_Link_Test(phpunit/class-block-library-navigation-link-test.php) now save, replace and restore the staticWP_Block_Supports::$block_to_renderinset_up()/tear_down().Why?
Both classes call their block's render function directly instead of going through
render_block(), soWP_Block_Supports::$block_to_render, which real rendering populates, staysnull. The render path reachesget_block_wrapper_attributes(), andapply_block_supports()then readsself::$block_to_render['attrs']onnull: only a notice on PHP 7.4, but a warning on PHP 8.0+, which this branch's PHPUnit configuration turns into a hard error.trunkuses the same save/replace/restore pattern inrender-last-posts-test.phpand several sibling block render tests.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