mathiasverraes/money
Small PHP money library that treats monetary values as immutable value objects to avoid floating-point errors. Includes currency support, arithmetic and comparisons, and formatting helpers—useful for modeling prices, totals, and discounts in a robust, domain-driven way.
Added Currency::zero() method
Release with support for PHP8.5.
Updated the ISO and Crypto currencies
Subtypes of InvalidArgumentException
Support PHP 8.4.
PHPUnit 10 support, updated currencies, updated dev dependencies
Extended support for psr/cache, now version 1.0.1 up until 3.0 is supported.
Support for PHP 8.3 and allow divisor in mod to be a number as well.
Add Teller object to help legacy applications
Optimization of BcMathCalculator and some minor fixes.
Support PHP 8.2, add Crypto Currencies and some fixes. Many thanks to @rogervila and @slunak for their help with this release!
Fix some more deprecation warnings.
Fix deprecation warnings.
Enable enable assertions in CI, fix invalid assertions
Improved PHP 8.1 support.
Fixed jsonSerialize return type, resulting in no warnings for PHP 8.1.
composer.json, including those bundled with PHP.empty uses. Money values of '0' gave an assertion error in decimal formats (#655).Fixes missing int as allowed parameter type for multiply and divide methods.
This release provides compatibility with PHP8.0 and has some BC breaks. See the CHANGELOG for more information. A special thanks goes to @Ocramius for being the main contributor of this release. He upgraded the package, implemented types and many more improvements. Since this release we recommend to use this library with a type-checker like Psalm.
This release provides compatibility with PHP8.0 and has some BC breaks. See the CHANGELOG for more information. A special thanks goes to @Ocramius for being the main contributor of this release. He upgraded the package, implemented types and many more improvements. Since this release we recommend to use this library with a type-checker like Psalm.
Money to be understood as pure/immutable downstream (#576)Bugfixes, more deprecations warning and some docs fixed. See CHANGELOG.md for details.
Money::EUR(500)Money::add and Money::subtract now accept variadic argumentsSeveral minor fixes and documentation changes.
Refactored Number usage to make the code cleaner and use less casting, and fix for casting to string issue on certain locales.
Fixes conversion with large numbers
Fixed Bitcoin symbol
Fixes rounding issue for negative values, and two other minor issues.
How can I help you explore Laravel packages today?