Weave 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 Bundle

Money Bundle Laravel Package

ph-il/money-bundle

ph-il/money-bundle brings structured money handling to Laravel/PHP apps, with helpers for monetary values, currencies, formatting, and conversions. Use it to keep prices, totals, and currency logic consistent and reusable across your project.

View on GitHub
Deep Wiki
Context7

ph-il/money-bundle provides a focused toolkit for handling monetary values safely in PHP applications. It keeps amounts and currencies together, reducing common floating-point and formatting mistakes when working with prices, invoices, or payments.

  • Immutable Money value objects for predictable operations
  • Currency-aware arithmetic and comparisons
  • Clean formatting for display and localization
  • Simple integration into existing PHP/Laravel projects
  • Extensible structure for custom money workflows
Frequently asked questions about Money Bundle
Is ph-il/money-bundle compatible with Laravel?
No. The package is explicitly a Symfony bundle: it ships a Bundle subclass, a DI extension with a configuration tree, and optional framework wiring, none of which Laravel can reach because Laravel boots through ServiceProviders and never calls Kernel::registerBundles(). Inside a Laravel app the package effectively reduces to moneyphp/money plus dead code. You can require moneyphp/money directly with zero loss of capability.
What does ph-il/money-bundle actually do?
It integrates Mathias Verraes' Money library (moneyphp/money) into a Symfony 6 project. The underlying library implements Fowler's Money pattern with immutable value objects, integer minor units, and pluggable arithmetic. The bundle itself contributes only framework glue, not domain logic you cannot get elsewhere.
How do I install ph-il/money-bundle in a Symfony project?
Install it with Composer and register the bundle in your Symfony bundles configuration, then configure it through the bundle's configuration tree. It targets Symfony 6, so it should not be installed into a Laravel application at all. For Laravel, install moneyphp/money and write a small service provider instead.
Can I use moneyphp/money directly in Laravel instead of the bundle?
Yes, and that is the recommended path. moneyphp/money is framework-agnostic and PSR-compatible, so it installs cleanly into any Laravel runtime. You then add a thin internal adapter: a service provider binding a configured money factory and an application currency context, an Eloquent cast, a validation rule, and a serializer contract. That build is roughly one to two days of work and yields a smaller surface than the bundle would have provided even in Symfony.
Which Laravel versions does ph-il/money-bundle support?
None. The package is built for Symfony 6 and has no Laravel service providers, facades, or auto-discovery metadata. There is no supported path to Laravel 10, 11, or 12 without hand-porting the bundle's service definitions into your own provider. At that point you have rewritten the package and own it.
How should I store money in a Laravel database to avoid rounding errors?
Persist integer minor units and an ISO 4217 currency code, typically as an amount string plus a currency column, and never use a float column. Wire this through an Eloquent cast so the domain layer always sees a Money value object. Your JSON resources should emit minor units plus currency code and explicitly document that decimal floats are not part of the contract.
Is ph-il/money-bundle actively maintained and safe for production?
The risk is vendor and validation risk rather than runtime risk. The repository shows a single maintainer, one star, zero dependents, and a single recent release dated 2025-12-20, which is not evidence of a CI matrix, test coverage, or a support commitment. The mature, widely adopted part of the stack is moneyphp/money; the risk concentrates entirely in the integration layer, which a Laravel app would not be using anyway. If you evaluate it, check for a CI matrix, test coverage against a supported PHP version, and a stated deprecation policy first.
What are the alternatives to ph-il/money-bundle for money handling in Laravel?
Adopt moneyphp/money directly and wrap it in an internal adapter rather than pulling in a Symfony bundle. Symfony-bundle bridges for Laravel exist but are an unmaintained pattern with their own risk surface, and hand-porting the bundle's service definitions means inheriting ownership of it. A homegrown provider, Eloquent cast, validation rule, and serializer is the smaller and safer option.
How do I format monetary values for display in a Laravel app?
Keep locale-aware formatting out of the domain layer and put it in a Blade helper or a dedicated formatter class. The domain layer should expose amounts as minor units plus a currency code, and the presentation layer converts those into localized strings. This mirrors the separation the bundle aims for in Symfony without needing the bundle.
What PHP, Symfony, and moneyphp/money versions does ph-il/money-bundle require?
The declared constraints are not documented in the package overview, so you must inspect its composer.json before relying on it. Confirm the supported PHP range against your Laravel runtime and confirm which moneyphp/money major the bundle allows. Also check whether the bundle imposes a default rounding mode or currency list that could silently diverge from your finance team's rules.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections