All Versions
25
Latest Version
Avg Release Cycle
69 days
Latest Release
200 days ago

Changelog History
Page 1

  • 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.
    • ๐Ÿ‘ 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
  • v3.1.1 Changes

    January 19, 2018

    ๐Ÿ›  Fixed

    • Float cast to string issue on certain locales
    • Deal with numbers represented with E-XX