Brick\Money v0.6.0 Release Notes

Release Date: 2022-08-02 // 17 days ago
  • ๐Ÿ’ฅ ๐Ÿ’ฅ Breaking changes

    • Minimum PHP version is now 7.4
    • AbstractMoney::getAmount() now has a return type
    • 0๏ธโƒฃ 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

Previous changes from v0.5.2

  • ๐Ÿ†• โœจ New methods

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

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

    Thanks @NCatalani!