Repository navigation
Repair wp/5.8 branch Actions: Update the minimum supported WordPress version to 5.7 - #84873
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 |
|
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. |
95b4f25 to
a906153
Compare
a906153 to
a70e5ef
Compare
a70e5ef to
711914e
Compare
Part of #82935.
What?
Ports #34536 to this branch. The plugin's minimum WordPress version goes from 5.6 to 5.7, and the compatibility code that only WordPress 5.6 needed is removed:
gutenberg.php: the minimum WordPress version goes to 5.7 in the plugin header, the version notice and the version check.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 #84454, which moved the polyfill's URL to jsDelivr.
Why?
This branch maintains the code as it exists in WordPress 5.8, and CI only runs it against WordPress 5.8 (
.wp-env.jsonusesWordPress/WordPress#5.8-branch). The branch was cut from Gutenberg 10.7 in May 2021, when trunk's minimum was still WordPress 5.6. Trunk raised it to 5.7 in #34536 that September, so the code it removed is still here. WordPress 5.8 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 callingblock_has_support()instead ofgutenberg_block_has_support().The plugin's polyfill URL,
https://unpkg.com/objectFitPolyfill@2.3.5/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?
The same changes as #34536 (351e52c), applied by hand because the surrounding lines differ on this branch (plugin version, React vendor URLs). The removed lines match trunk's exactly. The mobile bug report issue template's example version isn't changed.
The rest of the compatibility code for WordPress versions before 5.8 (the "can be removed when plugin support requires WordPress 5.8.0+" blocks,
lib/compat/wordpress-5.8/) is left as it is. Trunk removed it in #38273, a much larger change.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