sebastianbergmann / comparator

Provides the functionality to compare PHP values for equality.
BSD 3-Clause "New" or "Revised" License
6.99k stars 68 forks source link

Version 4.0.1 breaks backward compatibility #85

Closed acasademont closed 4 years ago

acasademont commented 4 years ago

Seems like a typehint was introduced in this patch release (https://github.com/sebastianbergmann/comparator/blob/4.0.1/src/ObjectComparator.php#L42), which makes it incompatible with prophecy at the moment. Should this change be reverted?

sebastianbergmann commented 4 years ago
$ roave-backward-compatibility-check --from=4.0.0 --to=4.0.1
Comparing from b8f4faa924ca9497619bd75a15be151aa2c33093 to 1de7b33e1d1fa4a58cb29b295c6e3349d73a6c4e...
Loading composer repositories with package information
Updating dependencies
Package operations: 3 installs, 0 updates, 0 removals
  - Installing sebastian/recursion-context (4.0.1): Loading from cache
  - Installing sebastian/exporter (4.0.1): Loading from cache
  - Installing sebastian/diff (4.0.1): Loading from cache
Writing lock file
Loading composer repositories with package information
Updating dependencies
Package operations: 3 installs, 0 updates, 0 removals
  - Installing sebastian/recursion-context (4.0.1): Loading from cache
  - Installing sebastian/exporter (4.0.1): Loading from cache
  - Installing sebastian/diff (4.0.1): Loading from cache
Writing lock file
[BC] CHANGED: The return type of SebastianBergmann\Comparator\TypeComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\TypeComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\SplObjectStorageComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\SplObjectStorageComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ScalarComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ScalarComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ResourceComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ResourceComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ObjectComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ObjectComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\NumericComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\NumericComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ObjectComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ObjectComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Factory#register() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Factory#register() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Factory#unregister() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Factory#reset() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ObjectComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ObjectComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\DoubleComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\DoubleComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\DateTimeComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\DateTimeComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\DOMNodeComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\DOMNodeComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ArrayComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\ArrayComparator#assertEquals() changed from no type to void
[BC] CHANGED: The return type of SebastianBergmann\Comparator\Comparator#setFactory() changed from no type to void
42 backwards-incompatible changes detected
sebastianbergmann commented 4 years ago
$ roave-backward-compatibility-check --from=4.0.0 --to=4.0.2 
Comparing from b8f4faa924ca9497619bd75a15be151aa2c33093 to cd10b8b3a0cc068cd9bd7a4958d02efc4ee418c7...
Loading composer repositories with package information
Updating dependencies
Package operations: 3 installs, 0 updates, 0 removals
  - Installing sebastian/recursion-context (4.0.1): Loading from cache
  - Installing sebastian/exporter (4.0.1): Loading from cache
  - Installing sebastian/diff (4.0.1): Loading from cache
Writing lock file
Loading composer repositories with package information
Updating dependencies
Package operations: 3 installs, 0 updates, 0 removals
  - Installing sebastian/recursion-context (4.0.1): Loading from cache
  - Installing sebastian/exporter (4.0.1): Loading from cache
  - Installing sebastian/diff (4.0.1): Loading from cache
Writing lock file
No backwards-incompatible changes detected
acasademont commented 4 years ago

thank you @sebastianbergmann , that was fast.