Skip to content

Bump minimum required WordPress version to 6.9#2517

Merged
westonruter merged 3 commits into
trunkfrom
update/2354-bump-min-wp-6.9
Jun 4, 2026
Merged

Bump minimum required WordPress version to 6.9#2517
westonruter merged 3 commits into
trunkfrom
update/2354-bump-min-wp-6.9

Conversation

@westonruter
Copy link
Copy Markdown
Member

Summary

Bumps the minimum supported WordPress version to 6.9 across all plugins and cleans up the technical debt this unblocks.

This builds on top of #2511 (which set the CI floor to 6.7 and converted the OD test helper to set_modifiable_text()), extending it to the full 6.9 bump that the issue calls for.

Version bump

  • Requires at least: 6.9 in all plugin headers (9 were 6.6, auto-sizes was 6.8).
  • CI minimum-version matrix leg: WP 6.7WP 6.9.
  • CONTRIBUTING.md minimum-version note updated to 6.9.

Cleanup enabled by the bump

  • Removed the dead is_wp_version_compatible( '6.9' ) entity-encoding workaround in the OD snapshot test helper.
  • Removed the version_compare( …, '6.8', '<' ) markTestSkipped() guards in the Auto Sizes tests.
  • Removed the now-always-true method_exists( …, 'set_modifiable_text' ) guard in the Web Worker Offloading test.

Switch snapshot assertions to assertEqualHTML()

Now that assertEqualHTML() (added in 6.9) is available, the shared OD snapshot assertion and the Image Prioritizer auto-sizes test use it instead of byte-exact assertEquals(). Because it normalizes attribute order and insignificant whitespace, this lets us drop the detect-args attribute-order canonicalization and the remove_initial_tabs() normalization (the helper is now unused and removed).

Two Image Prioritizer snapshots use markup that core's HTML API cannot normalize, so the fixtures were adjusted rather than adding a fallback:

  • The data-URL background image was switched from a base64 PNG to a semicolon-free inline SVG. build_visual_html_tree() splits style values on ; without respecting url(), so any ; in the value (e.g. ;base64) makes it throw.
  • The decoy end-tag comments placed outside of <head>/<body> were dropped (full-document parsing rejects content after </body>). The decoy comments inside <head>/<body> are retained, preserving the coverage that injection targets the real boundaries.

Testing

All affected PHPUnit suites pass: Optimization Detective (356), Image Prioritizer (91), Embed Optimizer (66), Web Worker Offloading (27), Auto Sizes (169). PHPStan (level 8) and PHPCS are clean.

Fixes #2354.

westonruter and others added 2 commits June 4, 2026 14:43
Bump "Requires at least" to 6.9 across all plugins (from 6.6, and from
6.8 for auto-sizes) and update the minimum-version CI matrix leg from
WP 6.6 to 6.9.

Clean up the technical debt this unblocks:

* Remove the dead is_wp_version_compatible( '6.9' ) entity-encoding
  workaround in the Optimization Detective snapshot test helper.
* Convert the script-module and stylesheet regex normalizers to
  WP_HTML_Tag_Processor::set_modifiable_text(). The detect-args
  normalizer stays a regex since it must canonicalize the type/id
  attribute order, which set_modifiable_text() cannot do.
* Drop the now-always-true method_exists( ..., 'set_modifiable_text' )
  guard in the Web Worker Offloading test.
* Remove the version_compare( ..., '6.8', '<' ) markTestSkipped() guards
  in the Auto Sizes tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Now that WordPress 6.9 is the minimum supported version, switch the
shared Optimization Detective snapshot assertion and the Image
Prioritizer auto-sizes test from byte-exact assertEquals() to the
semantic assertEqualHTML().

Because assertEqualHTML() normalizes attribute order and insignificant
whitespace, this removes two now-unnecessary normalizations: the
detect-args type/id attribute-order canonicalization and the
remove_initial_tabs() indentation stripping (the helper is now unused
and removed).

Two Image Prioritizer snapshots use markup that core's HTML API cannot
normalize, so adjust the fixtures rather than add a fallback:

* Switch the data-URL background image from a base64 PNG to a
  semicolon-free inline SVG. build_visual_html_tree() splits style
  values on ";" without respecting url(), so any ";" in the value
  (e.g. ";base64") makes it throw.
* Drop the decoy end-tag comments placed outside of HEAD/BODY. Full
  document parsing rejects content after </body>. The decoy comments
  inside HEAD/BODY are retained, preserving coverage that injection
  targets the real boundaries.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

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: westonruter <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>

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

@westonruter westonruter added [Type] Enhancement A suggestion for improvement of an existing feature [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) no milestone PRs that do not have a defined milestone for release and removed [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) labels Jun 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.29%. Comparing base (ac18b75) to head (c5e7725).
⚠️ Report is 4 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #2517   +/-   ##
=======================================
  Coverage   69.29%   69.29%           
=======================================
  Files          90       90           
  Lines        7723     7723           
=======================================
  Hits         5352     5352           
  Misses       2371     2371           
Flag Coverage Δ
multisite 69.29% <ø> (ø)
single 35.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Core appends a deterministic `//# sourceURL={handle}-js-{position}`
comment to inline script data (see Core-63887), which has been present
since 6.9. With 6.9 now the minimum supported version, the comment is
always emitted and its value never varies, so the tests no longer need
to normalize it away.

Remove the sourceURL stripping and instead assert the real emitted
output: append the comment to the partytown.js comparison and bake it
into the hardcoded inline-script expectations. The {{ plwwo_config }}
and {{ plwwo_inline_script }} placeholders already include it via
get_inline_script_data().

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copy link
Copy Markdown
Member

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

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

Tremendous!

@westonruter westonruter merged commit 4cbab3d into trunk Jun 4, 2026
27 checks passed
@westonruter westonruter deleted the update/2354-bump-min-wp-6.9 branch June 4, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no milestone PRs that do not have a defined milestone for release [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump minimum WordPress version to at least 6.7 (Yes, “SIX SEVEN”) but ideally 6.9

2 participants