Changelog History
Page 1
-
v0.7.0 Changes
October 06, 2022๐ฅ ๐ฅ Breaking changes
- JSON extension is now required for PHP 7.4 (always available with PHP >= 8.0)
- ๐
AbstractMoney
is now officially sealed, extending it yourself is not supported
๐ โจ New features
Money
andRationalMoney
now implementJsonSerializable
-
v0.6.0 Changes
August 02, 2022๐ฅ ๐ฅ Breaking changes
- Minimum PHP version is now 7.4
AbstractMoney::getAmount()
now has a return type- 0๏ธโฃ
CurrencyConverter
's constructor does not accept a default$context
anymore CurrencyConverter::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
-
v0.5.2 Changes
April 03, 2021๐ โจ New methods
Money::allocateWithRemainder()
Money::splitWithRemainder()
These methods perform like their
allocate()
andsplit()
counterparts, but append the remainder at the end of the returned array instead of spreading it over the first monies.Thanks @NCatalani!
-
v0.5.1 Changes
February 10, 2021๐ ๐ Improvement
BaseCurrencyProvider
now always returns aBigNumber
for convenience (#37). This is useful if you're usingBaseCurrencyProvider
on its own, not just inCurrencyConverter
.Thanks @rdarcy1!
-
v0.5.0 Changes
August 19, 2020๐ฑ ๐ Improvements
- compatibility with
brick/math
version0.9
โ ๏ธ Caution
๐ป When using
brick/math
version0.9
, theMoney
factory methods such asof()
andofMinor()
now accept decimal numbers in the form.123
and123.
, and do not throw an exception anymore in this case. - compatibility with
-
v0.4.5 Changes
May 31, 2020๐ ๐ Bug fix
๐ป
MoneyBag::getAmount()
,add()
andsubtract()
would throw an exception when using a custom currency. -
v0.4.4 Changes
January 23, 2020๐ โจ New method
AbstractMoney::isAmountAndCurrencyEqualTo()
compares a money to another. (#17)This method is different from
isEqualTo()
in 2 aspects:- it only accepts another money, not a raw number;
- it returns
false
if the money is in another currency , instead of throwing an exception.
-
v0.4.3 Changes
January 09, 2020๐ Improvements
MoneyBag::getAmount()
now accepts an ISO numeric currency code as well
๐ โจ New methods
CurrencyConverter::convertToRational()
converts to aRationalMoney
(#22)
-
v0.4.2 Changes
July 04, 2019๐ Performance improvement when calling
Money::formatTo()
many times for the same locale. -
v0.4.1 Changes
October 17, 2018โ Added support for
brick/math
version0.8
.