All Versions
26
Latest Version
Avg Release Cycle
69 days
Latest Release
481 days ago

Changelog History
Page 1

  • v4.0.3 Changes

    December 01, 2021

    🛠 Fixed

    • jsonSerialize return types, resulting in no PHP 8.1 warnings.
    • 📚 Documentation CI pipeline failure.
  • v4.0.2 Changes

    June 30, 2021

    🔄 Changes

    • ➕ Added all extensions to composer.json, including those bundled with PHP.

    🛠 Fixed

    • ✂ Remove all empty uses. Money values of '0' gave an assertion error in decimal formats (#655)
  • v4.0.1 Changes

    May 25, 2021

    🔄 Changed

    • 👍 Allow int as multiplier for Money::multiply
    • 👍 Allow int as divisor for Money::divide
  • v4.0.0 Changes

    May 17, 2021

    ➕ Added

    • PHP8.0 compatibility (#633 and #619)
    • Recommendation to use a type-checker like psalm or phpstan
    • Rounding to units
    • Converter#convertAndReturnWithCurrencyPair to get the combination of the converted money and currency pair
    • Converter#convertAgainstCurrencyPair to convert against a currency pair

    🔄 Changed

    • [BC break] BC Math required as it is the default calculator
    • [BC break] The methods multiply and divide do not accept floating points any more. Callers are required to convert a float to string (e.g. sprintf('%.14F', $float)) before calling these methods.
    • [BC break] The constructor of the FixedExchange does not accept floating points any more. Callers are required to 🖨 convert a float to string (e.g. sprintf('%.14F', $float)) before calling the constructor.
    • 👍 Allow multiple arguments to Money#isSameCurrency
    • 📜 Renamed second parameter of Parser#parse to $fallbackCurrency

    🛠 Fixed

    • 🛠 Fix GMP multiply and divide by negative (#640 #626)
    • Currency code must be uppercase (#639 #638 #637)
    • The CPU no longer overheats when using this library (#634)
    • No longer allowing null amount (#615)
    • ⚡️ Update cached currencies (#583)
    • Only numeric strings allowed (#575)
    • Calculator and Number are internal (#465)
    • Negative ratio in Money#allocate() is now allowed (#258)

    ✂ Removed

    • [BC break] Removed PhpCalculator
    • [BC break] Removed Currency#isAvailableWithin()
    • [BC break] Removed string as allowed parameter for MoneyParser#parse
    • [BC break] Completely remove float usage, methods now return numeric-strings
  • v3.3.1 Changes

    March 13, 2019

    🛠 Fixed

    • GMP: division of negative values
    • GMP: compare 0.x value
  • v3.3.0 Changes

    December 27, 2019

    🔄 Changed

    • ➕ Added types for Money to be understood as pure/immutable downstream (#576)

    🛠 Fixed

    • JSON serialization (#551)
    • 📚 Several documentation fixes
    • 🛠 Minor fixes
  • v3.2.1 Changes

    February 07, 2019

    🔄 Changed

    • Money::allocate now maintains keys of ratios array
    • 🗄 All parsers now emit a deprecation warning when passing currency as string

    🛠 Fixed

    • 📄 Docs fix : plus sign in numeric strings is allowed
    • ➕ Added ext-json as required extension
    • 👻 Throw exception in case of empty currency
    • BCMath calculator now uses scale parameters for addition and subtracting
    • 🛠 Fixed allocation remainder bug
    • ➕ Added PHP 7.3 in test suite
    • 🛠 Fixed dockerignore to ignore Dockerfile
    • 🛠 Fixed Bitcoin parsing bug when using trailing zeros
  • v3.2.0 Changes

    December 05, 2018

    ➕ Added

    • Exchanger exchange
    • Generated static factory to help IDEs understand code like Money::EUR(500)
    • Aggregation functions (min, max, avg, sum)

    🔄 Changed

    • Money::add and Money::subtract now accept variadic arguments

    🛠 Fixed

    • Division causing unnecessary fractional parts
    • Numeric comparison for negative numbers

    📚 Several minor fixes and documentation changes.

  • v3.1.3 Changes

    February 16, 2018

    🛠 Fixed

    • Allocation when the amount is smaller than the number of ratios
  • v3.1.2 Changes

    February 16, 2018

    ➕ Added

    • Number::fromNumber to be used when the actual type is not known

    🔄 Changed

    • 🔨 Refactored Number usage to make the code cleaner and use less casting

    🛠 Fixed

    • Float cast to string issue on certain locales