Skip to content

sebastian/comparator 8.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 07 Aug 07:23
· 2 commits to main since this release
Immutable release. Only release title and notes can be modified.
8.4.0
3b070e6

Added

  • Factory::setExporter() and Factory::exporter() for configuring the SebastianBergmann\Exporter\Exporter instance that is used by comparators registered with the factory

Changed

  • Comparators now use the Exporter instance configured for their Factory instead of creating their own instances (this allows customizing how values are represented in comparison failure messages)
  • When an object exporter provides the representation for the objects that are compared then that representation is used in the comparison failure message instead of the property-by-property representation; this does not apply to objects for which a comparator of their own exists (DateTimeComparator, for instance), as the representation such a comparator provides always has precedence