Skip to content

Releases: whitecube/php-prices

v4.0.0-beta.1

11 Oct 13:28
03c8f83
Compare
Choose a tag to compare
v4.0.0-beta.1 Pre-release
Pre-release

What's Changed

Full Changelog: v4.0.0-beta...v4.0.0-beta.1

v4.0.0-beta

16 Sep 08:00
50bbf15
Compare
Choose a tag to compare
v4.0.0-beta Pre-release
Pre-release

What's Changed

  • [4.x] Use RationalMoney when computing modifier totals by @voidgraphics in #16

Full Changelog: v3.1.1...v4.0.0-beta

Bug fixes

26 Jun 16:44
Compare
Choose a tag to compare
v3.1.1

Fixed serialization when working with RationalMoney

RationalMoney usage in serialized value

26 Jun 16:41
Compare
Choose a tag to compare
v3.1.0

Updated json serialization using RationalMoney

RationalMoney support

06 Mar 10:55
a428318
Compare
Choose a tag to compare

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.

PHP 8.1 support & new feature

17 Jan 10:16
c06c070
Compare
Choose a tag to compare

New features:

  • PHP 8.1 compatibility
  • toMinor method to easily access minor amount

Bug fixes:

  • Fixed parsing of values with narrow non-breaking spaces (a73bb01)

New feature update : formatUsing formatter classes

14 Aug 14:32
c9bf471
Compare
Choose a tag to compare

New feature update :

  • Price::formatUsing() : Now accepts callable closures, custom formatter class names (string) and instances (as long as they extend \Whitecube\Price\Formatting\CustomFormatter). Examples in the docs and tests.

New features: Money strings formatting

13 Aug 17:14
43702aa
Compare
Choose a tag to compare

New features:

  • Price::format(Price|Vat|Money $value, string $locale) : formats given monetary value into a human readable string respecting the target locale's formatting syntax.
  • Price::formatUsing(callable $closure) : add your own formatting functions!

Bug fixes

11 Aug 19:15
c3d25ca
Compare
Choose a tag to compare

Bug fixes :

  • Fixed PHP warning when parsing price strings due to currency symbols containing unescaped special characters in regex pattern - #7. Thanks @iksaku.

Bug fixes

04 Mar 11:09
15deb4d
Compare
Choose a tag to compare

Bug fixes :

  • Fixed MoneyMismatchException:contextMismatch when using different context - #4. Thanks @beko1997