PHPUnit Compatibility and WordPress Versions

Changes to supported PHPUnit versions have been as followed:

  • In WordPress 4.4: Added support for PHPUnit 5 was added on PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 7.0.
  • In WordPress 4.7: Added support for PHPUnit 6 on PHP 7.0 and 7.1.
  • In WordPress 5.1: Added support for PHPUnit 7 on PHP 7.1, 7.2, and 7.3. PHP 7.0 remains at PHPUnit 6.
  • In WordPress 5.2: Added support for PHPUnit 7 on PHP 7.0, and PHPUnit 5 on PHP 5.6.
  • In WordPress 5.9: Added a dependency on the external PHPUnit Polyfills, which enabled support for PHPUnit 8 and 9, making it so the tests can now run on the most appropriate PHPUnit version for each PHP version.
  • In WordPress 6.3: Dropped support for PHP 5.6 and thus PHPUnit 5.
  • In WordPress 6.6: Dropped support for PHP 7.0 and 7.1 and thus PHPUnit 6 and 7.

Supported Version Chart

WP | PHP Unit Version5.25.35.45.55.67.07.17.27.37.48.08.18.28.3
6.6xxxxxxx8999999
6.5xxxxx678999999
6.4xxxxx678999999
6.3xxxxx67899999x
6.2xxxx567899999x
6.1xxxx567899999x
6.0xxxx56789999xx
5.9xxxx56789999xx
5.8xxxx5577777*xxx
5.7xxxx5577777*xxx
5.6xxxx5577777*xxx
5.5xxxx557777xxxx
5.4xxxx557777xxxx
5.3xxxx557777xxxx
5.2xxxx55777xxxxx
5.13.644446777xxxxx
5.03.644446666xxxxx
4.93.64444666xxxxxx
4.83.6444466xxxxxxx
4.73.6444466xxxxxxx
4.63.644445xxxxxxxx
4.53.644445xxxxxxxx
4.43.644445xxxxxxxx
4.33.64444xxxxxxxxx
4.23.64444xxxxxxxxx
4.13.64444xxxxxxxxx
4.03.6444xxxxxxxxxx
3.93.6444xxxxxxxxxx
3.83.6444xxxxxxxxxx
3.73.6444xxxxxxxxxx

* The coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. test suite in these branches runs a modified version of PHPUnit 7 (which on its own is not compatible) on PHP 8. See #50902 for more information.

Last updated: