moneyphp/money
PHP library for handling money and currencies safely. Provides immutable Money and Currency value objects, arithmetic with proper rounding, comparisons, formatting, and allocation. Avoid floating-point errors in financial calculations; works well with PHP and frameworks like Laravel.
composer.lock is not committed anymoreCryptoCurrencies class that serves crypto-currencies from moneyphp/crypto-currenciesjsonSerialize return types, resulting in no PHP 8.1 warnings.composer.json, including those bundled with PHP.empty uses. Money values of '0' gave an assertion error in decimal formats (#655)int as multiplier for Money::multiplyint as divisor for Money::divideConverter#convertAndReturnWithCurrencyPair to get the combination of the converted money and currency pairConverter#convertAgainstCurrencyPair to convert against a currency pairmultiply 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.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.Money#isSameCurrencyParser#parse to $fallbackCurrencyMoney#allocate() is now allowed (#258)PhpCalculatorCurrency#isAvailableWithin()MoneyParser#parse, only Currency objects are accepted nowMoney to be understood as pure/immutable downstream (#576)Money::allocate now maintains keys of ratios arrayMoney::EUR(500)Money::add and Money::subtract now accept variadic argumentsNumber::fromNumber to be used when the actual type is not knownNumber usage to make the code cleaner and use less castingMoneyParser::parse method now expects a Currency objectMoneyParser::parse'5.00' and '5')Money\Exception\Exception to Money\ExceptionCurrency 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.How can I help you explore Laravel packages today?