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.

Supported Version Chart

WP | PHP Unit Version5.25.35.45.55.67.07.17.27.37.48.08.18.2
6.4xxxxx67899999
6.3xxxxx67899999
6.2xxxx567899999
6.1xxxx567899999
6.0xxxx56789999x
5.9xxxx56789999x
5.8xxxx5577777*xx
5.7xxxx5577777*xx
5.6xxxx5577777*xx
5.5xxxx557777xxx
5.4xxxx557777xxx
5.3xxxx557777xxx
5.2xxxx55777xxxx
5.13.644446777xxxx
5.03.644446666xxxx
4.93.64444666xxxxx
4.83.6444466xxxxxx
4.73.6444466xxxxxx
4.63.644445xxxxxxx
4.53.644445xxxxxxx
4.43.644445xxxxxxx
4.33.64444xxxxxxxx
4.23.64444xxxxxxxx
4.13.64444xxxxxxxx
4.03.6444xxxxxxxxx
3.93.6444xxxxxxxxx
3.83.6444xxxxxxxxx
3.73.6444xxxxxxxxx

* 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: