Skip to content

Repair wp/5.8 branch Actions: Update the minimum supported WordPress version to 5.7 - #84873

Open
desrosj wants to merge 1 commit into
fix-actions-5.8/disable-remote-patterns-in-e2efrom
fix-actions-5.8/update-minimum-wordpress-version
Open

desrosj wants to merge 1 commit into
fix-actions-5.8/disable-remote-patterns-in-e2efrom
fix-actions-5.8/update-minimum-wordpress-version

Conversation

@desrosj

@desrosj desrosj commented Oct 16, 2026

Copy link
Copy Markdown
Member

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 the objectFitPolyfill vendor script, the gutenberg_add_object_fit_polyfill() loader, and the inline script that sets the wp-i18n text direction.
  • lib/block-supports/: removes align.php, custom-classname.php and generated-classname.php, and their require lines in lib/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.json uses WordPress/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:

  • It registers its own object-fit polyfill (wp-polyfill-object-fit) behind the same "objectFit" in document.documentElement.style check.
  • It sets the wp-i18n text direction in wp_default_packages_scripts().
  • It ships the align, custom-classname and generated-classname block supports in wp-includes/block-supports/, registered under the same names. Apart from the gutenberg_ prefix, its copies differ from the plugin's only in calling block_has_support() instead of gutenberg_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

@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 16, 2026
@desrosj desrosj self-assigned this Oct 16, 2026
@desrosj
desrosj added this pull request to stack #84874 October 16, 2026 01:21
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 185efb47-7d22-4aa7-8a61-710813f4f3f7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj
desrosj removed this pull request from stack #84874 October 16, 2026 15:49
@desrosj
desrosj added this pull request to stack #84943 October 16, 2026 15:50
@desrosj
desrosj force-pushed the fix-actions-5.8/update-minimum-wordpress-version branch from 95b4f25 to a906153 Compare October 19, 2026 17:09
@desrosj
desrosj removed this pull request from stack #84943 October 21, 2026 19:47
@desrosj
desrosj added this pull request to stack #85352 October 21, 2026 19:48

@ramonjd ramonjd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failing checks pass at the top of this stack (#85351).

@desrosj
desrosj force-pushed the fix-actions-5.8/update-minimum-wordpress-version branch from a906153 to a70e5ef Compare October 22, 2026 18:35
@desrosj
desrosj force-pushed the fix-actions-5.8/update-minimum-wordpress-version branch from a70e5ef to 711914e Compare October 23, 2026 13:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants