Remove two polyfilled PHP native classes, which are no longer needed.
Drop support for PHP < 7.0 [3]
Simplify the tests for the AssertObjectEquals trait.
These tests had two flavours:
The base test class which is compatible with PHP 7.0 and higher.
This test class uses fixtures with return type declarations.
A mirror test class which is compatible with PHP 5.6+ with PHPUnit < 9.4.0.
This test class uses fixtures without return type declarations to make the tests runnable on PHP < 7.0.
This mirror test class, and its associated test fixtures, are no longer needed now support for PHP < 7.0 is being dropped.
Drop support for PHP < 7.0 [4]
In the original implementation of the assertObjectEquals() polyfill, the polyfill could not mirror the PHPUnit native implementation completely as that required support for return types, which was only added in PHP 7.0, while the polyfill was introduced in PHPUnit Polyfills 1.0, which still supported PHP 5.5.
So instead of checking whether the "comparator" method had a return type declared and verifying that this return type complied with the requirements set by PHPUnit, the polyfill originally checked whether the returned value complied with the required type.
Now support for PHP < 7.0 is being dropped, the assertObjectEquals() polyfill can be updated to fix this implementation difference.
Includes unit tests for the changed functionality/new logic paths throwing exceptions.
Includes updated documentation in the README.
coverage: 96.423% (+0.6%) from 95.846%
when pulling 8de2ad17ec60b04edc8a7954044992c6e292760d on feature/3.x/drop-support-for-php-7.0
into 61623d684bab7ae21a500f183274bdac0989a12d on 3.x.
Drop support for PHP < 7.0 [1]
Drop support for PHP < 7.0 [2]
Remove two polyfilled PHP native classes, which are no longer needed.
Drop support for PHP < 7.0 [3]
Simplify the tests for the
AssertObjectEquals
trait.These tests had two flavours:
This mirror test class, and its associated test fixtures, are no longer needed now support for PHP < 7.0 is being dropped.
Drop support for PHP < 7.0 [4]
In the original implementation of the
assertObjectEquals()
polyfill, the polyfill could not mirror the PHPUnit native implementation completely as that required support for return types, which was only added in PHP 7.0, while the polyfill was introduced in PHPUnit Polyfills 1.0, which still supported PHP 5.5.So instead of checking whether the "comparator" method had a return type declared and verifying that this return type complied with the requirements set by PHPUnit, the polyfill originally checked whether the returned value complied with the required type.
Now support for PHP < 7.0 is being dropped, the
assertObjectEquals()
polyfill can be updated to fix this implementation difference.Includes unit tests for the changed functionality/new logic paths throwing exceptions. Includes updated documentation in the README.
Refs: