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.
Architecture fit. The first finding dominates every other: symfgenus/money-bundle is a Symfony2 bundle, not a Laravel package. It is designed to register services into Symfony's kernel, DI container, configuration tree, and service tagging system — none of which exist in Laravel. There is no service provider, no facade, no config publishing, no package:discover autoloading, no artisan command surface. For a Laravel codebase the package does not fit the architecture at all. The only genuinely reusable asset is the underlying idea it wires up: the Money value object from mathiasverraes/money (Fowler's Money pattern — an amount in minor units paired with a Currency). That pattern is durable; the bundle is not.
Integration feasibility. Low to unusable for a Laravel target, and marginal even for a legacy Symfony2 service:
mathiasverraes/money has itself been superseded by moneyphp/money (v3/v4), which is actively maintained and is what any new work should use. The bundle wraps the abandoned ancestor.symfgenus/money-bundle) does not match the repository (hanishsingla/TbbcMoneyBundle), which is a fork signal. Confirm the composer.json name, branch lineage, and divergence from upstream before treating the artifact as trustworthy. Adoption in a real project would require a VCS repository entry, not Packagist.Technical risk. High, concentrated in three places:
The MIT license is clean and imposes no legal friction; that is the one unambiguously positive attribute.
Key questions for the requester.
DECIMAL/DOUBLE, ad-hoc number_format calls), and what is the data volume for backfill?Stack fit. Do not integrate the bundle into Laravel. Integrate the pattern using the maintained library:
composer require moneyphp/money (v4.x), with ext-bcmath (or ext-gmp) and ext-intl declared in composer.json.BIGINT column plus an ISO 4217 CHAR(3) currency column. Never FLOAT/DOUBLE, never a bare DECIMAL without an accompanying currency.MoneyCast) mapping the two columns to a Money object and back, so domain code never touches raw integers or floats.NumberFormatter-based presenter for locale-aware display, and validation rules for currency codes and amount ranges at the boundary.Money::allocate) in the domain layer and cover it with golden-value tests.Migration path. Treat the package as a reference implementation to read, not a dependency to install. If a Symfony2 service genuinely needs the bundle, pin it through a VCS repository entry, snapshot the code into a fork we control, and record the decision in an ADR. For Laravel the migration path is: raw floats/strings → Money value objects at the domain boundary → integer-minor-unit persistence. The strategic move is to depend on moneyphp/money directly and own the container wiring ourselves — roughly a one-day substitution, one fewer unmaintained third party on the critical path.
Compatibility. Target PHP 8.1+ with moneyphp/money v4. Confirm the currency-list version matches what finance expects, since ISO 4217 updates periodically. If a legacy Symfony2 service must coexist, isolate it behind an anti-corruption layer so no Money object from the old library crosses into the new domain.
Sequencing.
number_format calls; add a static-analysis rule to prevent reintroduction.Maintenance. Effectively zero upstream. Zero stars, zero dependents, an abandoned ancestor library, no release cadence, no CVE response. If adopted, the package becomes a permanently internal fork — budget ongoing ownership, not a one-time install. By contrast, moneyphp/money has an active maintainer base and is a low-maintenance dependency.
Support. No vendor, no community, no documentation beyond the README. Support is whatever the team writes. That argues for a short internal runbook plus an assigned owner inside the team that owns payments/billing, not a platform team at arm's length.
Scaling. Runtime cost is negligible — this is value-object arithmetic, not infrastructure. The scaling concern is correctness at volume: rounding drift, mixed-currency bugs, and allocation remainders compound with data volume, and the blast radius grows with transaction count. The backfill itself is a scaling exercise — plan for reconciliation jobs and dual-write throughput when migrating existing monetary data.
Failure modes. The dangerous ones are silent:
Detection strategy: nightly reconciliation, invariant checks (sum of allocated parts equals original), alerting on any minor-unit mismatch, and static analysis to block float usage in money code.
Ramp-up. Symfony2 bundle idioms are negative-value learning for a Laravel team — nobody gains from understanding them. moneyphp/money is roughly a day to become productive. The real learning curve is the policy, not the code: rounding modes, per-currency exponents, allocation rules, and how finance wants refunds and proration represented. Run a brown-bag with finance and engineering together, agree the ADR, then let engineering substitute the library. Realistic envelope: one day to swap the dependency, one sprint to instrument, backfill, and verify safely — after which the durable asset (money as a first-class domain concept) is ours, and the abandoned wrapper is not.
How can I help you explore Laravel packages today?