Releases: brick/money
Releases · brick/money
0.10.0
💥 ISO currency changes
ZWG
(Zimbabwe Gold) has been addedZWL
(Zimbabwean Dollar) has been removedSLL
(Sierra Leonean Leone) has been removed- The currency of Zimbabwe (
ZW
) has been changed toZWG
(Zimbabwe Gold) - The
SLL
currency has been removed from Sierra Leone (SL
), which only hasSLE
now
0.9.0
💥 Breaking changes
- Minimum PHP version is now 8.1
PDOProviderConfiguration
no longer has getters, its properties arepublic readonly
RoundingMode
frombrick/math
is now an enum, so:- all methods accepting an
int
rounding mode now accept aRoundingMode
instance instead - this should be transparent to your application, as you'll be using the same constants such as
RoundingMode::UP
- all methods accepting an
0.8.1
0.8.0
💥 Breaking changes
- Minimum PHP version is now 8.0
- Due to Croatia's adoption of the Euro on January 1st, 2023:
- the
HRK
currency (Kuna) has been removed from the ISO currency provider - the
HR
country (Croatia) is now mapped toEUR
(Euro)
- the
PDOProviderConfiguration
now has a proper constructor, and its properties are no longer publicPDOProviderConfiguration
now throws exceptions in the constructor when configuration is invalid- All documented union types are now strongly typed:
- If you have a custom
ExchangeRateProvider
implementation, you will need to update yourgetExchangeRate()
method signature - If you were passing
Stringable
objects toof()
or any of the methods internally callingof()
, and havestrict_types
enabled, you will need to explicitly cast these objects tostring
first
- If you have a custom
0.7.1
0.7.0
0.6.0
💥 Breaking changes
- Minimum PHP version is now 7.4
AbstractMoney::getAmount()
now has a return typeCurrencyConverter
's constructor does not accept a default$context
anymoreCurrencyConverter::convert()
now requires the$context
previously accepted by the constructor as third parameterMoney::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 likeallocateWithRemainder()
✨ New ISO currencies
SLE
(Leone) in Sierra Leone (SL
)
👌 Improvements
- Compatibility with
brick/math
version0.10
0.5.3
0.5.2
✨ New methods
Money::splitWithRemainder()
Money::allocateWithRemainder()
These methods perform like their split()
and allocate()
counterparts, but append the remainder at the end of the returned array instead of spreading it over the first monies.
Thanks @NCatalani!