Don't change error handling in WP_Theme_JSON_Gutenberg::set_spacing_sizes()#55354
Conversation
|
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/class-wp-theme-json-gutenberg.php ❔ phpunit/class-wp-theme-json-test.php |
jorgefilipecosta
left a comment
There was a problem hiding this comment.
The changes look good to me 👍
|
Thank you for the review and approval, @jorgefilipecosta! I apreciate it. |
|
Trac Ticket: https://core.trac.wordpress.org/ticket/60305 |
|
Thank you for working on this @anton-vlasenko 👍 FYI I updated the PHP Sync Tracking Issue to:
Please could I ask you to check back on the Tracing Issue when the Core PR is merged and mark the line item as complete? This will help us keep track of what's outstanding. Very much appreciated 🙏 |
|
@getdave, the PR has been merged, and I've marked it as complete in the PHP Sync Tracking issue. Thank you. |
|
Thank you Anton 🙇 |
What?
#55313 changed error handling in
WP_Theme_JSON_Gutenberg::set_spacing_sizes(). Since changes fromWP_Theme_JSON_Gutenbergwill eventually be merged into Core, it's important to maintain parity between both codebases.Why?
_doing_it_wrong()is not a direct replacement fortrigger_error(), since_doing_it_wrong()only triggers a PHP error ifWP_DEBUGis enabled.How?
This PR reverts the changes introduced in #55313 while maintaining PHPUnit 10 compatibility.
Testing Instructions
WP_Theme_JSON_Gutenberg_Testtests pass.Testing Instructions for Keyboard
Screenshots or screencast