Repository navigation
Repair wp/5.7 branch Actions: Update the minimum supported WordPress version to 5.7 - #84871
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: 0 B Total Size: 1.37 MB ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
f66dda9 to
2976cd4
Compare
2976cd4 to
da59f18
Compare
da59f18 to
9e4d05a
Compare
Part of #82936.
What?
Ports the parts of #34536 that apply to this branch. The plugin now requires WordPress 5.7, and the compatibility code that only older WordPress versions needed is removed:
gutenberg.phpandreadme.txt: the minimum WordPress version goes to 5.7. It was 5.3 ingutenberg.phpand 5.5.0 inreadme.txt.lib/client-assets.php: removes theobjectFitPolyfillvendor script, thegutenberg_add_object_fit_polyfill()loader, and the inline script that sets thewp-i18ntext direction.lib/block-supports/: removesalign.php,custom-classname.phpandgenerated-classname.php, and theirrequirelines inlib/load.php.This replaces #84788, which moved the polyfill's URL to jsDelivr.
Why?
This branch maintains the code as it exists in WordPress 5.7, and CI only runs it against WordPress 5.7 (
.wp-env.jsonusesWordPress/WordPress#5.7-branch). WordPress 5.7 provides each removed piece itself:wp-polyfill-object-fit) behind the same"objectFit" in document.documentElement.stylecheck.wp-i18ntext direction inwp_default_packages_scripts().align,custom-classnameandgenerated-classnameblock supports inwp-includes/block-supports/, registered under the same names. Apart from thegutenberg_prefix, its copies differ from the plugin's only in calling_wp_array_get()instead ofgutenberg_experimental_get(), and in an extra unused$block_attributesparameter onwp_apply_generated_classname_support().The plugin's polyfill URL,
https://unpkg.com/objectFitPolyfill@2.3.0/dist/objectFitPolyfill.min.js, also returns 404 now. unpkg lowercases package names since moving to Cloudflare Workers, so it can no longer serve npm packages with capital letters in their names (unpkg/unpkg#453). In development mode,gutenberg_register_vendor_script()tries to download it and falls back to enqueuing the dead URL. Removing the polyfill removes that request rather than moving it to another CDN.How?
#34536 (351e52c) doesn't apply to this branch's older files, so the same changes are applied by hand. Differences from trunk:
'5.7', not this branch's'X.Y.0'style. WordPress reports5.7for the 5.7.0 release, andversion_compare( '5.7', '5.7.0', '<' )is true, so'5.7.0'would turn the plugin off on WordPress 5.7.0.readme.txtgets the same bump. Trunk'sreadme.txtno longer had aRequires at leastline by then.Compatibility code for WordPress versions before 5.7 that #34536 didn't touch, such as the
lodashvendor script, is left as it is.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.
🤖 Generated with Claude Code