bee icon indicating copy to clipboard operation
bee copied to clipboard

Update PHPUnit to a newer version

Open yorkshire-pudding opened this issue 2 years ago • 1 comments

The bee tests currently use PHPUnit 8 According to https://phpunit.de/supported-versions.html PHPUnit 8 reached the end of bugfix support in February 2023 though it is not yet end of life and I think might still be getting security releases.

Major Version PHP Compatibility Initial Release End of Bugfix Support End of Life
PHPUnit 10 >= PHP 8.1 February 3, 2023 February 7, 2025 To be determined
PHPUnit 9 >= PHP 7.3 February 7, 2020 February 2, 2024 To be determined
PHPUnit 8 >= PHP 7.2 February 1, 2019 February 3, 2023 To be determined

Table copied on 2023-09-21

I think it would be reasonable to move to PHPUnit 9 but I don't think we're ready for 10 as there are probably quite a few sites still with PHP 7.4 that the bee testing couldn't cover.

Need to test whether using PHPUnit 9 causes any issues. There are some Backward Incompatibilities that might need addressing: https://phpunit.de/announcements/phpunit-9.html

yorkshire-pudding avatar Sep 21 '23 08:09 yorkshire-pudding

assertRegExp() was deprecated in 2020 for version 9.1 - https://github.com/sebastianbergmann/phpunit/issues/4086

Replace with assertMatchesRegularExpression()

yorkshire-pudding avatar May 10 '24 09:05 yorkshire-pudding