phpcompatibility/phpcompatibility-wp
A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.
2.1.8
37M downloads/mo
#573 most downloaded on Packagist
PHPCompatibility/PHPCompatibilityWP
What this package is like to depend on
Last release 8 months ago
16 Dec 2025
Ships fairly regularly
a new release about every 5 months
Nearly every release is documented
notes for 11 of 11 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
13 releases · first in 2018
3 releases in the last 12 months
see the full history below
Release timeline
13 releases · Jul 2018 to Dec 2025Releases
latest 13-
3.0.0-alpha216 Dec 2025 pre-releaseRelease notes
Open source →- Ruleset: Updated for improved compatibility with WordPress 6.5 and for compatibility with WordPress 6.8 and 6.9. Thanks @rodrigoprimo!
- General housekeeping and maintenance.
Release notes
Open source →- Ruleset: Updated for improved compatibility with WordPress 6.5 and for compatibility with WordPress 6.8 and 6.9. Thanks [@rodrigoprimo]!
- General housekeeping and maintenance.
-
3.0.0-alpha122 Oct 2025 pre-releaseRelease notes
Open source →- Composer: All PHPCompatibility dependencies have been updated to the recently released PHPCompatibility 10.0.0-alpha1 based versions.
Note: in select cases, this means that custom<exclude>rules in a project's[.]phpcs.xml[.dist]configuration file may needs to be updated.
Along the same lines, selective// phpcs:ignorecomments used inline may need to be updated with the new sniff code(s).
For full information on these kind of changes, please refer to the Upgrade guide for PHPCompatibility 10.0.0. - The Composer PHPCS plugin will now be installed automatically to register PHPCompatibility and other external standards with PHP_CodeSniffer.
If you have arequire-devin place for this plugin in your owncomposer.json, it is strongly recommended to remove this to prevent conflicting version constraints.
If you previously used another Composer plugin, manually set theinstalled_pathsconfiguration, or set theinstalled_pathsin your[.]phpcs.xml[.dist]configuration file, it is recommended you remove this in favour of letting the Composer PHPCS plugin handle this. - Support for PHP 5.3 has been dropped. The new minimum supported PHP version is 5.4.
- Support for PHP_CodeSniffer 4.0 has been added.
- Support for PHP_CodeSniffer < 3.13.3 has been dropped.
Release notes
Open source →- Composer: All PHPCompatibility dependencies have been updated to the recently released PHPCompatibility 10.0.0-alpha1 based versions.
Note: in select cases, this means that custom
<exclude>rules in a project's[.]phpcs.xml[.dist]configuration file may needs to be updated. Along the same lines, selective// phpcs:ignorecomments used inline may need to be updated with the new sniff code(s). For full information on these kind of changes, please refer to the Upgrade guide for PHPCompatibility 10.0.0. - The [Composer PHPCS plugin] will now be installed automatically to register PHPCompatibility and other external standards with PHP_CodeSniffer.
If you have a
require-devin place for this plugin in your owncomposer.json, it is strongly recommended to remove this to prevent conflicting version constraints. If you previously used another Composer plugin, manually set theinstalled_pathsconfiguration, or set theinstalled_pathsin your[.]phpcs.xml[.dist]configuration file, it is recommended you remove this in favour of letting the [Composer PHPCS plugin] handle this. - Support for PHP 5.3 has been dropped. The new minimum supported PHP version is 5.4.
- Support for PHP_CodeSniffer 4.0 has been added.
- Support for PHP_CodeSniffer < 3.13.3 has been dropped.
- Composer: All PHPCompatibility dependencies have been updated to the recently released PHPCompatibility 10.0.0-alpha1 based versions.
-
2.1.818 Oct 2025Release notes
Open source →This is a maintenance release.
- The ruleset now includes schema tags.
- General housekeeping and maintenance.
Release notes
Open source →This is a maintenance release.
- The ruleset now includes schema tags.
- General housekeeping and maintenance.
-
2.1.712 May 2025Release notes
Open source →- Composer: The minimum supported version of PHP_CodeSniffer has been raised to 3.3.0.
- Ruleset: Prevent deprecation notice on PHP_CodeSniffer 3.13.0+.
Release notes
Open source →- Composer: The minimum supported version of PHP_CodeSniffer has been raised to 3.3.0.
- Ruleset: Prevent deprecation notice on PHP_CodeSniffer 3.13.0+.
-
2.1.616 Jan 2025Release notes
Open source →This is a maintenance release.
- README: Fixed some broken badges.
- General housekeeping and documentation updates. Including a contribution by @johnbillion.
Release notes
Open source →- README: Fixed some broken badges.
- General housekeeping and documentation updates. Including a contribution by [@johnbillion].
-
2.1.524 Apr 2024Release notes
Open source →- Ruleset: Updated for compatibility with WordPress 6.5. Thanks @swissspidy.
- The recommended version of the Composer PHPCS plugin is now
^1.0. - Other housekeeping and documentation updates. Includes contributions from @fredden and @johnbillion.
Release notes
Open source →- Ruleset: Updated for compatibility with WordPress 6.5. Thanks [@swissspidy]
- The recommended version of the [Composer PHPCS plugin] is now
^1.0. - Other housekeeping and documentation updates. Includes contributions from [@fredden] and [@johnbillion].
-
2.1.424 Oct 2022Release notes
Open source →- Composer: The package will now identify itself as a static analysis tool. Thanks @GaryJones!
- Other housekeeping and minor documentation updates.
Release notes
Open source →- Composer: The package will now identify itself as a static analysis tool. Thanks [@GaryJones]!
- Other housekeeping and minor documentation updates.
-
2.1.330 Dec 2021Release notes
Open source →- Ruleset: Updated for compatibility with WordPress 5.9.
- README: Updated the installation instructions for compatibility with Composer >= 2.2.
- Minor housekeeping.
Release notes
Open source →- Ruleset: Updated for compatibility with WordPress 5.9.
- README: Updated the installation instructions for compatibility with Composer >= 2.2.
- Minor housekeeping.
-
2.1.221 Jul 2021Release notes
Open source →- Ruleset: Updated for compatibility with WordPress 5.8.
- Documentation: improved installation instructions. Props @afragen.
Release notes
Open source →- Ruleset: Updated for compatibility with WordPress 5.8.
- Documentation: improved installation instructions. Props Andy Fragen.
-
2.1.115 Feb 2021Release notes
Open source →- The recommended version of the Composer PHPCS plugin is now
^0.7.0, which offers compatibility with Composer 2.0. - The ruleset is now also tested against PHP 7.4 and 8.0.
Note: full PHP 7.4 support is only available in combination with PHP_CodeSniffer >= 3.5.6.
Note: runtime PHP 8.0 support is only available in combination with PHP_CodeSniffer >= 3.5.7, full support is expected in PHP_CodeSniffer 3.6.0.
Release notes
Open source →- The recommended version of the [Composer PHPCS plugin] is now
^0.7.0, which offers compatibility with Composer 2.0. - The ruleset is now also tested against PHP 7.4 and 8.0. Note: full PHP 7.4 support is only available in combination with PHP_CodeSniffer >= 3.5.6. Note: runtime PHP 8.0 support is only available in combination with PHP_CodeSniffer >= 3.5.7, full support is expected in PHP_CodeSniffer 3.6.0.
- The recommended version of the Composer PHPCS plugin is now
-
2.1.028 Aug 2019Release notes
Open source →- Ruleset: Updated for the Sodium_Compat polyfill which is included in WordPress 5.2.
- Composer: The recommended version of the [Composer PHPCS plugin] has been upped to
^0.5.0. - Documentation: Updated the ruleset inline documentation and the Readme to reflect the change in minimum PHP requirements for WordPress as of WP 5.2.
- Documentation: Updated the ruleset inline documentation to include information on when each polyfill was added to/removed from WordPress.
- CI: The rulesets are now also tested against PHP 7.3. Note: full PHP 7.3 support is only available in combination with PHP_CodeSniffer 2.9.2 or 3.3.1+ due to an incompatibility within PHP_CodeSniffer itself.
-
2.0.007 Oct 2018Release notes
Open source →- Ruleset: Updated for compatibility with PHPCompatibility 9.0+.
- Composer: Added dependency for a dedicated polyfill-based PHPCompatibility ruleset.
- CI: Added a test for the ruleset.
- Readme: Removed the installation instructions for a non-Composer based install.
-
1.0.016 Jul 2018