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

tbbc/money-bundle

A Symfony bundle that integrates the moneyphp/money library into your application, offering Twig filters and extensions for formatting monetary values, form types for money input, and ready-to-use services for safe currency handling.

View on GitHub
Deep Wiki
Context7

This bundle is used to integrate the Money library (https://github.com/mathiasverraes/money) into a Symfony project. This library is based on Fowler's Money pattern (https://verraes.net/2011/04/fowler-money-pattern-in-php/)

Frequently asked questions about Money Bundle
Is tbbc/money-bundle compatible with Laravel?
No. It is a Symfony bundle, which means it registers services, form types, validators, Twig extensions and Doctrine types through the Symfony FrameworkBundle kernel. Laravel ships selected Symfony components such as http-foundation and console, but not FrameworkBundle, so there is no bundle registration mechanism to hook into. Installing it into a Laravel app will not auto-wire anything useful.
What does tbbc/money-bundle actually do?
It is integration glue around the mathiasverraes/money library (now moneyphp/money), which implements Fowler's Money pattern. The bundle adds Symfony-specific wiring: DI container service definitions, Symfony form types for money input, validators, Twig filters and extensions for formatting monetary values, and a Doctrine money column type. The Money value object itself lives in the framework-agnostic library, not in the bundle.
How do I install tbbc/money-bundle?
It is installed with Composer as tbbc/money-bundle and then registered in a Symfony application's bundles.php or Kernel, typically with a minimal config block. It requires a Symfony application with FrameworkBundle present, so the install is only meaningful inside a Symfony project. In Laravel there is no bundle registration step, so installation alone gives you nothing.
Should I use moneyphp/money instead of this bundle in a Laravel app?
Yes, for Laravel the pragmatic path is to depend on moneyphp/money directly and build a small Laravel-native layer around it. That layer is typically a service provider binding, an Eloquent cast for money columns, a validation rule, and a Blade or JSON formatter. It is a day or two of work, owned by your team, and versioned against Laravel rather than Symfony.
Can I use Symfony form types and Twig extensions from this bundle in Laravel?
No. Laravel uses Blade rather than Twig and its own validation pipeline rather than Symfony form types and validators, so those features have no consumer in a Laravel codebase. The equivalent Laravel work is a Blade directive or helper for formatting, plus a custom validation rule for money input. Only the arithmetic and value object behaviour from moneyphp/money carries over unchanged.
Does the Doctrine money type help if I use Eloquent?
No. The bundle's Doctrine type maps money to a database column through Doctrine DBAL, which Laravel's Eloquent does not use for attribute casting. Under Eloquent you would implement a custom cast class that converts between minor units or a decimal column and a Money instance. That cast is small and replaces the Doctrine type entirely.
What PHP and Symfony versions does tbbc/money-bundle support?
Its constraints track Symfony majors and a matching PHP range, so you must check composer.json for the exact matrix before evaluating it. Because the bundle follows Symfony release cycles, its supported versions are the bundle maintainer's upgrade problem, not moneyphp/money's. Also verify that any Symfony component versions it pulls in transitively do not conflict with the constraints Laravel already imposes.
Is tbbc/money-bundle actively maintained and safe for production?
Signals are mixed: roughly 196 GitHub stars, zero listed dependents, and a small maintainer footprint. Release metadata should be verified against the actual tag history before treating it as actively maintained. Licensing is MIT, so the legal side is clean, but the technical risk sits in the wrapper rather than in the underlying domain library.
What are the alternatives to tbbc/money-bundle for handling money in PHP?
The most direct alternative is moneyphp/money itself, which is framework-agnostic and gives you the Money, Currency and MoneyBag value objects plus safe arithmetic and allocation. For Laravel specifically, you pair it with a thin integration layer of your own rather than adopting a framework-specific wrapper. Other ecosystems offer similar libraries, but moneyphp/money is the canonical PHP implementation of Fowler's Money pattern.
When would adopting tbbc/money-bundle make sense?
Only if your estate already runs Symfony services where bundle registration is native and you need the extras like form types, validators or the Doctrine type. In that case it is a natural fit and saves you writing the wiring yourself. For a pure Laravel stack, treat the bundle as a reference implementation for how to wire money into a framework, not as a dependency.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource