PHP 8.4 deprecates implicitly nullable parameters, i.e. typed parameter with a null default value, which are not explicitly declared as nullable.
The ValueObject fixture used in these tests used one such implicitly nullable parameters.
The tests for the AssertObjectEquals trait already needed two test classes to allow the method to be fully tests cross-version:
One set which was run on PHPUnit < 9.4.0.
One set which runs against PHP 7.0+.
As the nullability operator was introduced in PHP 7.1 and the particular test affected does need to be typed to still test what it is supposed to test, I'm changing the requirements both test sets:
The requirement for the first set of tests will now be PHPUnit < 9.4.0 AND PHP < 8.4.
The requirement for the second set of test will now be PHP 7.1+.
This way the tests still covers the trait sufficiently.
Note: the trait itself is not affected by the deprecation.
coverage: 96.232% (-1.0%) from 97.254%
when pulling cee3353aa9c9b8391f6f26ad0d8688b406cf0422 on feature/assertobjectequalstests-fix-php-8.4-deprecation
into e3a5bad2c69c147fbde4b8ad83f422bac3b36153 on 1.x.
PHP 8.4 deprecates implicitly nullable parameters, i.e. typed parameter with a
null
default value, which are not explicitly declared as nullable.The
ValueObject
fixture used in these tests used one such implicitly nullable parameters.The tests for the
AssertObjectEquals
trait already needed two test classes to allow the method to be fully tests cross-version:As the nullability operator was introduced in PHP 7.1 and the particular test affected does need to be typed to still test what it is supposed to test, I'm changing the requirements both test sets:
This way the tests still covers the trait sufficiently.
Note: the trait itself is not affected by the deprecation.