Supported Versions

Major Version PHP Compatibility Initial Release Support until Life Support until
PHPUnit 9 >= PHP 7.3 February 7, 2020 To be determined To be determined
PHPUnit 8 >= PHP 7.2 February 1, 2019 To be determined To be determined
PHPUnit 7 PHP 7.1 - PHP 7.3 February 2, 2018 February 7, 2020 February 7, 2020
PHPUnit 6 PHP 7.0 - PHP 7.2 February 3, 2017 February 1, 2019 February 1, 2019
PHPUnit 5 PHP 5.6 - PHP 7.1 October 2, 2015 February 2, 2018 February 2, 2018
PHPUnit 4 PHP 5.3 - PHP 5.6 March 7, 2014 February 3, 2017 February 3, 2017

Support means that bugs will be fixed for a version of PHPUnit.

Support for major version X ends two years after its initial release (when major version (X+2) is released).

Support for minor version X.Y ends when minor version X.(Y+1) is released.

According to our release plan, PHPUnit 10 should have been released in February 2021. Unfortunately, this was not possible. The support timeline for PHPUnit 8 and PHPUnit 9 will be updated when PHPUnit 10 is released.

Life Support means that changes will be made for an otherwise unsupported version of PHPUnit to be compatible with new versions of PHP. Life Support ends when an old version of PHPUnit cannot be made compatible with a new version of PHP without breaking backwards compatibility.

The fact that a version of PHPUnit supports a specific PHP version means that this version of PHPUnit works on that PHP version for PHP code that is compatible with the version of PHP required by the PHPUnit version in question. For example, PHPUnit 8.5 requires PHP 7.2. PHPUnit 8.5 works for PHP code compatible with PHP 7.2 on PHP 8. However, PHPUnit 8.5's test double code generator does not support PHP 8's union types syntax, for example.

Juliette Reinders Folmer maintains phpunit-polyfills, a library that "offers a number of polyfills for functionality which was introduced, split up or renamed in PHPUnit". Use this if you must be able to run your tests using PHPUnit 4 through PHPUnit 9.