-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Plugin: require minimum WordPress 6.2 #53451
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
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/block-supports/elements.php ❔ lib/block-supports/settings.php ❔ lib/compat/wordpress-6.3/block-patterns.php ❔ lib/compat/wordpress-6.3/class-gutenberg-rest-block-patterns-controller-6-3.php ❔ lib/load.php ❔ phpunit/block-template-utils-test.php |
lib/block-supports/elements.php
Outdated
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.
since 6.0.0
lib/block-supports/settings.php
Outdated
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.
since 6.2.0
|
Size Change: 0 B Total Size: 1.51 MB ℹ️ View Unchanged
|
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.
since 6.2
5c6bdd4 to
848a067
Compare
|
Adding a few folks who worked in |
|
Requires #53499 for the static analysis tests to pass |
848a067 to
56f71ad
Compare
dmsnell
left a comment
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.
Thanks @ramonjd! Things look okay from the perspective of the HTML API ✅
aaronrobertshaw
left a comment
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.
Nice work @ramonjd 👍
Changes LGTM.
I didn't spot any issues comparing patterns behaviour between trunk and this PR using both 6.2 and 6.3.
| * @package gutenberg | ||
| */ | ||
|
|
||
| if ( ! function_exists( 'wp_theme_has_theme_json' ) ) { |
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.
Removing this file is ok. It was introduced in 6.2, and it was already using the core functions, when available.
| * (admin area, multisite environment…), please move it | ||
| * to a more appropriate file instead. | ||
| * | ||
| * @package gutenberg |
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.
LOL, this was empty 😄
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.
👻
| * @package gutenberg | ||
| */ | ||
|
|
||
| if ( ! function_exists( 'get_classic_theme_supports_block_editor_settings' ) ) { |
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.
Sounds good.
lib/compat/wordpress-6.2/class-gutenberg-rest-global-styles-controller-6-2.php
Outdated
Show resolved
Hide resolved
56f71ad to
f4696fe
Compare
| gutenberg_load_remote_block_patterns(); // Patterns with the `core` keyword. | ||
| gutenberg_load_remote_featured_patterns(); // Patterns in the `featured` category. | ||
| gutenberg_register_remote_theme_patterns(); // Patterns requested by current theme. | ||
|
|
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 moved the get_items() method from Gutenberg_REST_Block_Patterns_Controller_6_2 to Gutenberg_REST_Block_Patterns_Controller_6_3 because the following methods were updated in 6.3:
- gutenberg_load_remote_block_patterns
- gutenberg_load_remote_featured_patterns
- gutenberg_register_remote_theme_patterns
The consequence is that Gutenberg plugin users who are running WordPress 6.2 will get the benefit of these 6.3 changes.
Does that sound legit @aaronrobertshaw ?
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.
That's sounds right, yes.
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.
Thanks for checking 🙇🏻
6531035 to
c5a4e1d
Compare
|
Are there any blockers? It would be great to land it now after RC1 for the plugin gets created, as we will have 3 weeks to catch any regressions before these changes are released. |
Thanks for the ping @gziolo None that I'm aware of, just looking for a ✅ I'll rebase today and give it a final smoke test. |
b355642 to
2d0587c
Compare
|
Flaky tests detected in 2d0587c533266ad395417cc308b1088122b7710d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6043804281
|
|
PHP 7 fails unrelated. Suspect recent Core changes: https://core.trac.wordpress.org/changeset/56500 |
gziolo
left a comment
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.
We definitely need to wait until all CI checks pass, but otherwise, this PR seems ready. It looks similar to all other changes applied when increasing the minimum WP version supported.
- wp_get_elements_class_name since 6.0.0 - _wp_get_presets_class_name since 6.2.0 Ensuring `build_query_vars_from_query_block` doesn't receive `gutenberg_` prefix during build
- Add usages of wp_normalize_remote_block_pattern (since 6.2)
- Removed tests already covered in Core
…er_6_2 to Gutenberg_REST_Block_Patterns_Controller_6_3 because the following methods were updated in 6.3: - gutenberg_load_remote_block_patterns - gutenberg_load_remote_featured_patterns - gutenberg_register_remote_theme_patterns
…ntroller-6-3.php because it wanted to live after a less than ideal rebase
2d0587c to
efadeea
Compare
ntsekouras
left a comment
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.
Smoke tested and looks good! Let's 🚢 . Thank you Ramon!
What?
WordPress 6.3 has been released: https://wordpress.org/news/2023/08/lionel/ 🎹
This PR removes 6.2 compatibility code, thereby making WordPress 6.2 the minimum version required for the Gutenberg plugin.
This is a first pass. There might be 6.2 code and other compat work to be done after this, for example, ensuring that any deprecated functions are replaced, duplicated unit tests removed.
How?
compat/6.2foldergutenberg_methods with their core equivalentsTesting Instructions
Ensure things are not broken.
Run the Gutenberg plugin with WP 6.2, and confirm editors work as before.
Run the Gutenberg plugin with WP 6.3, and confirm editors work as before.
If you're using
wp-envyou can add an.wp-env.override.jsonfile to Gutenberg root:{ "core": "WordPress/WordPress#6.2" }or
{ "core": "WordPress/WordPress#6.3" }and run
npm run wp-env start --update