Skip to content

Releases: brick/money

0.10.0

12 Oct 21:35
Compare
Choose a tag to compare

💥 ISO currency changes

  • ZWG (Zimbabwe Gold) has been added
  • ZWL (Zimbabwean Dollar) has been removed
  • SLL (Sierra Leonean Leone) has been removed
  • The currency of Zimbabwe (ZW) has been changed to ZWG (Zimbabwe Gold)
  • The SLL currency has been removed from Sierra Leone (SL), which only has SLE now

0.9.0

26 Nov 16:55
Compare
Choose a tag to compare

💥 Breaking changes

  • Minimum PHP version is now 8.1
  • PDOProviderConfiguration no longer has getters, its properties are public readonly
  • RoundingMode from brick/math is now an enum, so:
    • all methods accepting an int rounding mode now accept a RoundingMode instance instead
    • this should be transparent to your application, as you'll be using the same constants such as RoundingMode::UP

0.8.1

23 Sep 21:18
25f484a
Compare
Choose a tag to compare

👌 Improvement

Currency now implements JsonSerializable (#79).

Thanks @joelvh!

0.8.0

16 Jan 00:00
Compare
Choose a tag to compare

💥 Breaking changes

  • Minimum PHP version is now 8.0
  • Due to Croatia's adoption of the Euro on January 1st, 2023:
    • the HRK currency (Kuna) has been removed from the ISO currency provider
    • the HR country (Croatia) is now mapped to EUR (Euro)
  • PDOProviderConfiguration now has a proper constructor, and its properties are no longer public
  • PDOProviderConfiguration now throws exceptions in the constructor when configuration is invalid
  • All documented union types are now strongly typed:
    • If you have a custom ExchangeRateProvider implementation, you will need to update your getExchangeRate() method signature
    • If you were passing Stringable objects to of() or any of the methods internally calling of(), and have strict_types enabled, you will need to explicitly cast these objects to string first

0.7.1

15 Jan 23:32
Compare
Choose a tag to compare

👌 Improvements

  • Compatibility with brick/math version 0.11

0.7.0

05 Oct 22:12
Compare
Choose a tag to compare

💥 Breaking changes

  • JSON extension is now required for PHP 7.4 (always available with PHP >= 8.0)
  • AbstractMoney is now officially sealed, extending it yourself is not supported

New features

  • Money and RationalMoney now implement JsonSerializable

0.6.0

01 Aug 23:11
Compare
Choose a tag to compare

💥 Breaking changes

  • Minimum PHP version is now 7.4
  • AbstractMoney::getAmount() now has a return type
  • CurrencyConverter's constructor does not accept a default $context anymore
  • CurrencyConverter::convert() now requires the $context previously accepted by the constructor as third parameter
  • Money::allocateWithRemainder() now refuses to allocate a portion of the amount that cannot be spread over all ratios, and instead adds that amount to the remainder (#55)
  • Money::splitWithRemainder() now behaves like allocateWithRemainder()

New ISO currencies

  • SLE (Leone) in Sierra Leone (SL)

👌 Improvements

  • Compatibility with brick/math version 0.10

0.5.3

10 Oct 12:01
Compare
Choose a tag to compare

✨ Add support for VED (Venezuelan bolívar) currency.

0.5.2

03 Apr 20:58
Compare
Choose a tag to compare

New methods

  • Money::splitWithRemainder()
  • Money::allocateWithRemainder()

These methods perform like their split() and allocate() counterparts, but append the remainder at the end of the returned array instead of spreading it over the first monies.

Thanks @NCatalani!

0.5.1

10 Feb 14:21
c6f2883
Compare
Choose a tag to compare

👌 Improvement

BaseCurrencyProvider now always returns a BigNumber for convenience (#37).
This is useful if you're using BaseCurrencyProvider on its own, not just in CurrencyConverter.

Thanks @rdarcy1!