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

symfgenus/money-bundle

symfgenus/money-bundle is a Symfony bundle for working with monetary values in a consistent, currency-aware way. It connects money objects with Symfony services, configuration, and templating, making price handling and formatting easier across your application.

View on GitHub
Deep Wiki
Context7

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

Frequently asked questions about Money Bundle
Does symfgenus/money-bundle work with Laravel?
No. It is a Symfony2 bundle that registers services into Symfony's kernel, DI container and configuration tree, and Laravel has none of those. There is no service provider, no facade, no publishable config and no package:discover support, so Composer will install files that Laravel never boots. For a Laravel application the bundle does not fit architecturally at all.
How do I install symfgenus/money-bundle?
You would need to add a VCS repository entry pointing at the GitHub fork, because the Composer name does not line up with the repository and it is not reliably available on Packagist. Its Symfony2 constraints also conflict with PHP 8.1+ and modern Composer resolution, so installs typically fail before any code runs. It is not a recommended installation path for any current project.
What should I use instead of symfgenus/money-bundle in Laravel?
Use moneyphp/money (v4.x) directly and declare ext-bcmath or ext-gmp plus ext-intl in composer.json. moneyphp/money is the actively maintained successor to the abandoned mathiasverraes/money library this bundle wraps. Pair it with a custom Eloquent cast so domain code never handles raw integers or floats.
Which PHP and Symfony versions does this bundle support?
It targets Symfony2, which reached end of life years ago and receives no security fixes. Its constraints predate typed properties and modern PHP, so expect deprecated syntax and dependency conflicts on PHP 8.1 and above. Running it on a supported runtime is not viable.
Is symfgenus/money-bundle safe to use in production?
The risk is high. There is no maintainer, no security feed, no CI, zero stars and zero dependents, so any defect you hit becomes yours to fix. Monetary code fails silently through rounding drift, float coercion and mixed currencies rather than throwing, which makes an unmaintained wrapper especially dangerous.
Why does the Composer name differ from the GitHub repository name?
The package is listed as symfgenus/money-bundle while the repository is hanishsingla/TbbcMoneyBundle, which is a fork signal. You should verify the composer.json name, branch lineage and divergence from upstream before trusting the artifact. Unverified provenance plus no release cadence is a strong argument for not adopting it.
How should I store monetary values in a Laravel database?
Store the amount as integer minor units in a BIGINT column alongside an ISO 4217 CHAR(3) currency column, and never use FLOAT or DOUBLE. A bare DECIMAL without a currency column is also a trap because it invites mixing currencies. Map the two columns to a Money object with an Eloquent custom cast so the rest of the codebase only sees value objects.
What rounding and precision rules should money handling follow?
Respect ISO 4217 minor units and per-currency exponents rather than assuming two decimal places. Use bcmath or gmp for arithmetic and apply an explicit rounding mode such as banker's rounding where finance requires it. Decide up front whether tax is stored inclusive or exclusive and keep allocation remainders deterministic when splitting amounts.
How do I test money handling in a Laravel application?
Unit test the Eloquent cast round-trip so integers and Money objects survive save and reload unchanged. Cover allocation and split remainders, mixed-currency exceptions and locale formatting through intl's NumberFormatter. Property-based or fuzz tests are worth adding because rounding drift only shows up across many operations.
What is Fowler's Money pattern and why does it matter here?
The pattern models an amount in minor units paired with a Currency as an immutable value object, which prevents accidental float math and currency mixing. That idea is durable and worth adopting; the Symfony2 bundle that wires it up is not. Implement the pattern with moneyphp/money and your own Laravel integration layer instead of this package.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
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