-
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
(WP 6.4-compat) Add missing type
attribute in WP 6.4 compat's block-hooks.php
#55138
(WP 6.4-compat) Add missing type
attribute in WP 6.4 compat's block-hooks.php
#55138
Conversation
Warning: Type of PR label error To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. |
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/compat/wordpress-6.4/block-hooks.php |
Flaky tests detected in 502d671. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6435218018
|
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.
I can confirm this solves the issue.
cc @gziolo -- since this change is required to get the core PHPUnit tests to pass, does this need to be part of the WordPress backport? I'm not exactly sure how that works with compat files |
…s `block-hooks.php` (#55138) * Add missing `type` attribute in WP 6.4 compat's `block-hooks.php` * Type is required for API schemas
It looks like everything is looking good on the core side. Thank you for bringing the same changes to the plugin to the code that offers backward compatibility for older versions of WordPress: |
…s `block-hooks.php` (#55138) * Add missing `type` attribute in WP 6.4 compat's `block-hooks.php` * Type is required for API schemas
What?
Add missing
type
attribute in WP 6.4 compat'sblock-hooks.php
Why?
Activating Gutenberg 16.7+ in an env with WP 6.4 is causing failures in the following test: https://github.com/WordPress/wordpress-develop/blob/36d4e7ebcc2deb9ec9de7f4ffc4161135f87d1c5/tests/phpunit/tests/rest-api/rest-block-type-controller.php, because Gutenberg does not define the type in schema for block-type and block-hooks fields in its back compat shim. Example of a failure (there are around 10 if you try running it):
How?
See "What".
Testing Instructions
trunk
) in a dev version of WP 6.4 with PHPUnit tests setupTesting Instructions for Keyboard
Screenshots or screencast