All Versions
21
Latest Version
Avg Release Cycle
73 days
Latest Release
208 days ago

Changelog History
Page 2

  • v0.3.3 Changes

    August 22, 2018

    ⚡️ ISO currency list update.

  • v0.3.2 Changes

    August 20, 2018

    Money::formatTo() can now format the amount as a whole number:

    formatTo(string $locale, bool $allowWholeNumber = false) : string
    

    0️⃣ By default, formatTo() always outputs all the fraction digits:

    Money::of('23.5', 'USD')->formatTo('en_US'); // $23.50
    Money::of(23, 'USD')->formatTo('en_US'); // $23.00
    

    But can now be allowed to return the whole number by passing true as a second argument:

    Money::of('23.5', 'USD')->formatTo('en_US', true); // $23.50
    Money::of(23, 'USD')->formatTo('en_US', true); // $23
    

    Note that this version now requires brick/math version 0.7.3. This is not a BC break. If you've locked your composer.json to an earlier version, you will just not be able to install brick/money version 0.3.2.

  • v0.3.1 Changes

    August 04, 2018

    ⚡️ ISO currency list update.

  • v0.3.0 Changes

    July 26, 2018

    🆕 New methods:

    • CurrencyConversionException::getSourceCurrencyCode()
    • CurrencyConversionException::getTargetCurrencyCode()

    This allows to programmatically get the failing currency pair when an exchange rate is not available.

    💥 Breaking change:

    • CurrencyConversionException constructor signature changed

    Although this is technically a breaking change and requires a version bump, your code is unlikely to be affected, unless you're creating CurrencyConversionException instances manually (you shouldn't).

  • v0.2.4 Changes

    January 10, 2018

    ⚡️ ISO currency list update.

  • v0.2.3 Changes

    December 01, 2017

    🐛 Bug fix: Money::allocate() incorrectly allocated negative monies.

  • v0.2.2 Changes

    November 20, 2017

    Money::formatTo() now always respects the scale of the Money.

  • v0.2.1 Changes

    November 05, 2017

    🆕 New method: CustomContext::getScale()

  • v0.2.0 Changes

    October 02, 2017
    • Minimum requirement is now PHP 7.1
    • 🗄 BigRational::toMoney() has been deprecated; use to() instead. This is the result of a factorization of a common feature in Money and RationalMoney.
  • v0.1.1 Changes

    December 08, 2017

    Backports from 0.2.x:

    • 🆕 New method: CustomContext::getScale()
    • Money::formatTo() now always respects the scale of the Money
    • 🐛 Bug fix: Money::allocate() incorrectly allocated negative monies