Skip to content

WP 7.0: account for the raised minimum PHP version and removed polyfills#99

Merged
jrfnl merged 1 commit into
masterfrom
wp-7.0-update
Jul 1, 2026
Merged

WP 7.0: account for the raised minimum PHP version and removed polyfills#99
jrfnl merged 1 commit into
masterfrom
wp-7.0-update

Conversation

@rodrigoprimo

Copy link
Copy Markdown
Collaborator

WordPress 7.0 raised the minimum supported PHP version from 7.2.24 to 7.4 and, as a result, removed three polyfills from src/wp-includes/compat.php (is_countable(), array_key_first() and array_key_last()). They were introduced in PHP 7.3 and are now natively available given the new PHP 7.4 minimum. See https://core.trac.wordpress.org/ticket/62622 and https://core.trac.wordpress.org/changeset/61459.

The <exclude> rules for these polyfills are kept so that projects targeting older WordPress versions (where the polyfills are still present) don't get false positives. Following the existing pattern, their comments in the ruleset are updated to note that they were removed in WP 7.0.

The documented minimum PHP version and the testVersion example in the ruleset and the README.md are also updated to reflect the new PHP 7.4 requirement.

I also checked that WP 7.0 did not add any new polyfill that I could find.

Previous PR updating the list of polyfills: #88

WordPress 7.0 raised the minimum supported PHP version from 7.2.24 to 7.4
and, as a result, removed three polyfills from `src/wp-includes/compat.php`
(`is_countable()`, `array_key_first()` and `array_key_last()`). They were
introduced in PHP 7.3 and are now natively available given the new PHP 7.4
minimum. See https://core.trac.wordpress.org/ticket/62622 and
https://core.trac.wordpress.org/changeset/61459.

The `<exclude>` rules for these polyfills are kept so that projects
targeting older WordPress versions (where the polyfills are still present)
don't get false positives. Following the existing pattern, their comments
in the ruleset are updated to note that they were removed in WP 7.0.

The documented minimum PHP version and the `testVersion` example in the ruleset
and the README are also updated to reflect the new PHP 7.4 requirement.

@jrfnl jrfnl 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.

Thanks @rodrigoprimo ! LGTM.

@jrfnl jrfnl added this to the 3.0.0-alpha3 milestone Jul 1, 2026
@jrfnl jrfnl merged commit d9a599f into master Jul 1, 2026
5 checks passed
@jrfnl jrfnl deleted the wp-7.0-update branch July 1, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants