Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 test class uses fixtures with return type declarations.
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.
Refs: