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
lib/block-supports/settings.php
Outdated
|
Size Change: 0 B Total Size: 1.51 MB ℹ️ View Unchanged
|
5c6bdd4 to
848a067
Compare
|
Adding a few folks who worked in |
|
Requires #53499 for the static analysis tests to pass |
848a067 to
56f71ad
Compare
aaronrobertshaw
left a comment
There was a problem hiding this comment.
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.
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 |
| * @package gutenberg | ||
| */ | ||
|
|
||
| if ( ! function_exists( 'get_classic_theme_supports_block_editor_settings' ) ) { |
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.
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.
That's sounds right, yes.
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.
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.
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