-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't change error handling in WP_Theme_JSON_Gutenberg::set_spacing_sizes() #55354
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_Gutenberg
will 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_DEBUG
is enabled.How?
This PR reverts the changes introduced in #55313 while maintaining PHPUnit 10 compatibility.
Testing Instructions
WP_Theme_JSON_Gutenberg_Test
tests pass.Testing Instructions for Keyboard
Screenshots or screencast