Skip to content

RationalMoney support

Compare
Choose a tag to compare
@voidgraphics voidgraphics released this 06 Mar 10:55
· 8 commits to master since this release
a428318

This new major version

  • adds support for \Brick\Money\RationalMoney instances as the base value for price objects.
  • adds typehints everywhere
  • removes support for PHP 7.4

The aim is to allow division and multiplication operations to be done without rounding errors. More information about rounding errors can be found here.

Warning
This contains breaking changes, tied to the changes in typehints in interfaces and classes you may implement/extend.

Namely, classes that implement the Whitecube\Price\PriceAmendable interface, and classes that extend Whitecube\Price\Formatting\CustomFormatter need to specify the correct, updated typehints. Consult these files and update your typehints appropriately.