Bump minimum required WordPress version to 6.9#2517
Conversation
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]>
|
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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]>
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.9in all plugin headers (9 were6.6, auto-sizes was6.8).WP 6.7→WP 6.9.CONTRIBUTING.mdminimum-version note updated to 6.9.Cleanup enabled by the bump
is_wp_version_compatible( '6.9' )entity-encoding workaround in the OD snapshot test helper.version_compare( …, '6.8', '<' )markTestSkipped()guards in the Auto Sizes tests.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-exactassertEquals(). Because it normalizes attribute order and insignificant whitespace, this lets us drop the detect-args attribute-order canonicalization and theremove_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:
build_visual_html_tree()splitsstylevalues on;without respectingurl(), so any;in the value (e.g.;base64) makes it throw.<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.