主要版本 | PHP 兼容性 | 初始发行 | 错误修复支持结束 | 生命周期结束 |
---|---|---|---|---|
PHPUnit 10 | >= PHP 8.1 | 2023 年 2 月 3 日 | 2025 年 2 月 7 日 | 待定 |
PHPUnit 9 | >= PHP 7.3 | 2020 年 2 月 7 日 | 2024 年 2 月 2 日 | 待定 |
PHPUnit 8 | >= PHP 7.2 | 2019 年 2 月 1 日 | 2023 年 2 月 3 日 | 待定 |
PHPUnit 7 | PHP 7.1 - PHP 7.3 | 2018 年 2 月 2 日 | 2020 年 2 月 7 日 | 2020 年 2 月 7 日 |
PHPUnit 6 | PHP 7.0 - PHP 7.2 | 2017 年 2 月 3 日 | 2019 年 2 月 1 日 | 2019 年 2 月 1 日 |
PHPUnit 5 | PHP 5.6 - PHP 7.1 | 2015 年 10 月 2 日 | 2018 年 2 月 2 日 | 2018 年 2 月 2 日 |
PHPUnit 4 | PHP 5.3 - PHP 5.6 | 2014 年 3 月 7 日 | 2017 年 2 月 3 日 | 2017 年 2 月 3 日 |
Bugfix Support means that bugs will be fixed for a version of PHPUnit.
Bugfix Support for major version X
ends two years after its initial release (when major version (X+2)
is released).
Bugfix Support for minor version X.Y
ends when minor version X.(Y+1)
is released.
When Bugfix Support ends for a major version, Life Support for this major version begins.
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, for instance.