Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Money Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v4.8.0

Release with support for PHP8.5.

v4.7.1

Updated the ISO and Crypto currencies

v4.7.0

Subtypes of InvalidArgumentException

v4.6.0

Support PHP 8.4.

v4.5.0

PHPUnit 10 support, updated currencies, updated dev dependencies

v4.4.0

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

v4.3.0

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

v4.2.0

Add Teller object to help legacy applications

v4.1.1

Optimization of BcMathCalculator and some minor fixes.

v4.1.0

Support PHP 8.2, add Crypto Currencies and some fixes. Many thanks to @rogervila and @slunak for their help with this release!

v3.3.3

Fix some more deprecation warnings.

v3.3.2

Fix deprecation warnings.

v4.0.5

Enable enable assertions in CI, fix invalid assertions

v4.0.4

Improved PHP 8.1 support.

v4.0.3

Fixed jsonSerialize return type, resulting in no warnings for PHP 8.1.

v4.0.2
  • Added all extensions to composer.json, including those bundled with PHP.
  • Remove all empty uses. Money values of '0' gave an assertion error in decimal formats (#655).
v4.0.1

Fixes missing int as allowed parameter type for multiply and divide methods.

v4.0.0

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.

v4.0.0-beta1

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.

v3.3.1

Fixed

  • GMP: division of negative values
  • GMP: compare 0.x value
v3.3.0

Changed

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

Fixed

  • JSON serialization (#551)
  • Several documentation fixes
  • Minor fixes
v3.2.1

Bugfixes, more deprecations warning and some docs fixed. See CHANGELOG.md for details.

v3.2.0

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

Several minor fixes and documentation changes.

v3.1.3
v3.1.2

Refactored Number usage to make the code cleaner and use less casting, and fix for casting to string issue on certain locales.

v3.1.1

Fixes conversion with large numbers

v3.1.0
v3.0.9

Fixed Bitcoin symbol

v3.0.8

Fixes rounding issue for negative values, and two other minor issues.

v3.0.7

Update currencies.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport