PackageTrack
Sign in Get early access

moneyphp/money

PHP implementation of Fowler's Money pattern

v4.9.0 98M downloads/mo #326 most downloaded on Packagist moneyphp/money

What this package is like to depend on

Last release 3 months ago

04 May 2026

Ships fairly regularly

a new release about every 4 months

Most releases are documented

notes for 35 of 42 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

48 releases · first in 2012

2 releases in the last 12 months

see the full history below

Release timeline

48 releases · Aug 2012 to May 2026
2013 2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 48
  1. v4.9.0 04 May 2026
    Release notes

    Added Currency::zero() method

    Open source →
    Release notes

    Added

    • Currency::zero() method
    Open source →
  2. v4.8.0 23 Oct 2025
    Release notes

    Release with support for PHP8.5.

    Open source →
    Release notes

    Added

    • PHP 8.5 support
    Open source →
  3. v4.7.1 06 Jun 2025
    Release notes

    Updated the ISO and Crypto currencies

    Open source →
    Release notes

    Updated

    • Updated the ISO and Crypto currencies
    Open source →
  4. v4.7.0 03 Apr 2025
    Release notes

    Subtypes of InvalidArgumentException

    Open source →
    Release notes

    Added

    • Subtypes of InvalidArgumentException
    Open source →
  5. v4.6.0 22 Nov 2024
    Release notes

    Added

    • PHP 8.4 support
    Open source →
  6. v4.5.1 27 Sep 2024

    Nothing published for this version

  7. v4.5.0 15 Feb 2024
    Release notes

    PHPUnit 10 support, updated currencies, updated dev dependencies

    Open source →
    Release notes

    Fixed

    • PHPUnit 10 support
    • Update currencies
    • Updated doctrine/coding-standard
    • Updated other dev dependencies

    Removed

    • PHP 8.0 support
    Open source →
  8. v4.4.0 24 Jan 2024
    Release notes

    Extended support for psr/cache, now version 1.0.1 up until 3.0 is supported.

    Open source →
    Release notes

    Added

    • Extended support for psr/cache, now version 1.0.1 up until 3.0 is supported.
    Open source →
  9. v4.3.0 22 Nov 2023
    Release notes

    Support for PHP 8.3 and allow divisor in mod to be a number as well.

    Open source →
    Release notes

    Added

    • Support for PHP 8.3
    • Allow divisor in mod to be a number as well

    Removed

    • PHPSpec tests, we are using PHPUnit only now
    Open source →
  10. v4.2.0 16 Aug 2023
    Release notes

    Add Teller object to help legacy applications

    Open source →
    Release notes

    Added

    • Teller object to help legacy applications
    Open source →
  11. v4.1.1 11 Apr 2023
    Release notes

    Fixed

    • Optimized result representation for BcMathCalculator
    • Use sprintf for float to string conversion in swap exchange
    • Fix rounding to unit with value between 10 and 49
    • Return type for DecimalMoneyFormatter::format is numeric-string
    • Money::ratioOf throws exception if currencies don't match.
    • Updated currencies: added SLE and VED, removed HRK.
    • Do not let php-http/discovery change composer.json.
    Open source →
  12. v4.1.0 19 Dec 2022
    Release notes

    Added

    • Full PHP8.2 compatibility

    Fixed

    • Fix parsing amounts with leading zero's
    • Fix invalid exception message in DecimalMoneyParser
    • Upgrade enchant to newer version
    • Support Psalm 5.3
    • Fix ROUND_UP and ROUND_DOWN in roundToUnit

    Changes

    • composer.lock is not committed anymore
    • MoneyFactory now also contains crypto-currencies

    Added

    Open source →
  13. v4.0.5 11 Aug 2022
    Release notes

    Fixed

    • Enabled zend.assertions during CI
    • Fixed invalid assertions
    Open source →
  14. v4.0.4 18 May 2022
    Release notes

    Added

    • Full PHP8.1 compatibility (#670)

    Changes

    • Dropped mutation testing as the library owners are unfamiliar with it
    • CHANGELOG BC change improvement
    Open source →
  15. v4.0.3 01 Dec 2021
    Release notes

    Fixed

    • jsonSerialize return types, resulting in no PHP 8.1 warnings.
    • Documentation CI pipeline failure.
    Open source →
  16. v4.0.2 30 Jun 2021
    Release notes

    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)
    Open source →
  17. v4.0.1 25 May 2021
    Release notes

    Changed

    • Allow int as multiplier for Money::multiply
    • Allow int as divisor for Money::divide
    Open source →
  18. v4.0.0 17 May 2021
    Release notes

    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 type for second parameter to MoneyParser#parse, only Currency objects are accepted now
    • [BC break] Completely remove float usage, methods now return numeric-strings
    Open source →
  19. v4.0.0-beta1 05 May 2021 pre-release

    Nothing published for this version

  20. v3.3.3 21 Sep 2022

    Nothing published for this version

  21. v3.3.2 05 Sep 2022

    Nothing published for this version

  22. v3.3.1 18 Mar 2020
    Release notes

    Fixed

    • GMP: division of negative values
    • GMP: compare 0.x value
    Open source →
  23. v3.3.0 27 Dec 2019
    Release notes

    Changed

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

    Fixed

    • JSON serialization (#551)
    • Several documentation fixes
    • Minor fixes
    Open source →
  24. v3.2.1 07 Feb 2019
    Release notes

    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
    Open source →
  25. v3.2.0 05 Dec 2018
    Release notes

    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
    Open source →
  26. v3.1.3 16 Feb 2018
    Release notes

    Fixed

    • Allocation when the amount is smaller than the number of ratios
    Open source →
  27. v3.1.2 15 Feb 2018
    Release notes

    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
    Open source →
  28. v3.1.1 19 Jan 2018
    Release notes

    Fixed

    • Float cast to string issue on certain locales
    • Deal with numbers represented with E-XX
    Open source →
  29. v3.1.0 10 Jan 2018
    Release notes

    Added

    • CurrencyList to instantiate in-memory currencies
    • modulus method to Money
    • ratioOf method to Money
    • Comparator for easier testing Money object with PHPUnit
    • IntlLocalizedDecimalParser and IntlLocalizedDecimalFormatter

    Changed

    • MoneyParser::parse method now expects a Currency object
    • Dropped PHP 5.5

    Deprecated

    • Passing currency code as string to MoneyParser::parse

    Fixed

    • Do not allocate remainder to a ratio of zero
    • Conversion result is always 0 when subunit difference is large enough
    • Unexpected result when converting small Bitcoin amounts
    • Fixed StyleCI being too aggressive
    Open source →
  30. v3.0.9 05 Nov 2017
    Release notes

    Fixed

    • Bitcoin currency symbol
    Open source →
  31. v3.0.8 03 Oct 2017
    Release notes

    Fixed

    • Rounding issue in Number class.
    • Reduce composer package file size by leaving out docs and logo.
    • Missing Travis tests for PHP 7.2.
    Open source →
  32. v3.0.7 04 Aug 2017
    Release notes

    Changed

    • Currencies
    Open source →
  33. v3.0.6 25 Jul 2017
    Release notes

    Added

    • IndirectExchange: a way to get an exchange rate through a minimal set of intermediate conversions.

    Fixed

    • Tests for HHVM
    • Incorrect documentation on Bitcoin parser
    Open source →
  34. v3.0.5 26 Apr 2017
    Release notes

    Added

    • numericCodeFor method to ISOCurrencies
    Open source →
  35. v3.0.4 21 Apr 2017
    Release notes

    Added

    • Negative method

    Changed

    • Updated ISO Currencies
    • Removed old Belarusian ruble from ISOCurrencies (BYR)

    Fixed

    • ISOCurrencies will no longer have a blank currency
    • Double symbol when formatting negative Bitcoin amounts
    Open source →
  36. v3.0.3 22 Mar 2017
    Release notes

    Fixed

    • Parsing empty strings and number starting or ending with a decimal point for DecimalMoneyParser
    • Parsing zero for DecimalMoneyParser
    • Multiplying and dividing with a locale that use commas as separator
    Open source →
  37. v3.0.2 11 Mar 2017
    Release notes

    Fixed

    • BCMath / GMP: comparing values smaller than one
    • GMP: multiplying with zero
    • ISOCurrencies: minor refactoring, remove duplication of code
    Open source →
  38. v3.0.1 14 Feb 2017
    Release notes

    Added

    • Reversed Currencies Exchange to try resolving reverse of a currency pair
    • Documentation on allowed integer(ish) values when constructing Money

    Fixed

    • Passing integer validation when chunk started with a dash
    • Passing integer validation when the fractional part started with a dash
    • Formatting problem for Bitcoin currency with small amounts in PHP < 7.0
    • Money constructed from a string with fractional zeroes equals to a Money constructed without the fractional part (eg. '5.00' and '5')
    Open source →
  39. v3.0.0 26 Oct 2016
    Release notes

    Added

    • DecimalMoneyFormatter: returns locale-independent raw decimal string

    Changed

    • [BC break] Replaced StringToUnitsParser with DecimalMoneyParser
    • [BC break] Moved Money\Exception\Exception to Money\Exception
    • [BC break] UnkownCurrencyException is now DomainException instead of RuntimeException
    • [Doctrine break] In Currency the private variable name was renamed to code, which could break your Doctrine mapping if you are using embeddables or any other Reflection related implementation.
    Open source →
  40. v3.0.0-beta4 21 Oct 2016 pre-release

    Nothing published for this version

  41. v3.0.0-beta.3 04 Oct 2016 pre-release
    Release notes

    Added

    • FixedExchange: returns fixed exchange rates based on a list (array)

    Changed

    • [BC break] Convert method now moved to its own class: Converter
    • [BC break] Exchange had one method getCurrencyPair which is now renamed to quote
    • Minor documentation issues

    Fixed

    • Integer detection when the number overflows the integer type and contains zeros
    • Rounding numbers containg trailing zeros
    • Converting Money to currency with different number of subunits
    Open source →
  42. v3.0.0-beta.2 03 Aug 2016 pre-release
    Release notes

    Added

    • PHP Spec tests
    • absolute method to Money and Calculator
    • subunitFor method to Currencies
    • Currencies now extends IteratorAggregate
    • Library exceptions now implement a common interface
    • Formatter and Parser implementation are now rounding half up

    Changed

    • [BC break] Dropped PHP 5.4 support
    • [BC break] Intl and Bitcoin formatters and parsers now require Currencies
    • ISOCurrencies now uses moneyphp/iso-currencies as currency data source

    Fixed

    • Documentation to be inline with upcoming version 3
    • Rounding issues in calculators with negative numbers
    • Formatting and parser issues for amounts and numbers with a trailing zero
    • Improved many exception messages
    • Registration of own Calculator implementations
    Open source →
  43. v3.0.0-beta 01 Mar 2016 pre-release
    Release notes

    Added

    • Bitcoin parser and formatter
    • Also checking tests folder for StyleCI

    Fixed

    • Currencies are now included in the repo
    • Currency list generation moved to dev dependency: reduces repo size
    • BC Math calculator adding and subtracting failed when bcscale was set
    • Parsing zero for StringToUnitsParser
    Open source →
  44. v3.0.0-alpha 04 Feb 2016 pre-release
    Release notes

    Added

    • Currency repositories (ISO currencies included)
    • Money exchange (including Swap implementation)
    • Money formatting (including intl formatter)
    • Money parsing (including intl parser)
    • Big integer support utilizing different, transparent calculation logic upon availability (bcmath, gmp, plain php)
    • Money and Currency implements JsonSerializable
    • Rounding up and down
    • Allocation to N targets

    Changed

    • [BC break] Money::getAmount() returns a string instead of an int value
    • [BC break] Moved stringToUnits to StringToUnitsParser parser
    • Library requires at least PHP 5.4
    • Library uses PSR-4

    Fixed

    • Integer overflow

    Removed

    • [BC break] UnkownCurrency exception
    • [BC break] Currency list is now provided by umpirsky/currency-list
    • [BC break] RoundingMode class
    • [BC break] Announced deprecations are removed (Currency::getName, CurrencyPair::getRatio, Money::getUnits)
    Open source →
  45. v1.3.0 16 Jan 2016

    Nothing published for this version

  46. 1.2.1 07 Oct 2014

    Nothing published for this version

  47. 1.2.0 12 Apr 2013

    Nothing published for this version

  48. 1.1.0 03 Aug 2012

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive