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

Technical Evaluation

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:

  • Symfony2 reached end of life years ago. Modern PHP runtimes (8.1+) and modern Composer resolution will fight the bundle's constraints. Expect deprecated syntax, missing typed properties, and constraint conflicts before you write a line of application code.
  • The upstream library 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.
  • Provenance needs verification. The Composer name (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.
  • Zero stars, zero dependents, no visible CI, no release cadence. There is effectively no external validation of the code.

Technical risk. High, concentrated in three places:

  1. Abandonment risk — no maintainer, no security feed, no bugfix path. Any defect we find, we own.
  2. Runtime correctness risk — monetary code has a uniquely bad failure mode: it fails silently (rounding drift, float coercion, mixed currencies) rather than throwing. An unmaintained wrapper around a superseded library gives no guardrails.
  3. Knowledge risk — adopting Symfony2 bundle idioms onto a Laravel team is negative-value learning. Nobody on the team will be able to maintain it confidently.

The MIT license is clean and imposes no legal friction; that is the one unambiguously positive attribute.

Key questions for the requester.

  • Is there an actual legacy Symfony2 service in scope, or is "Laravel/PHP" in the brief a mistaken framing? The answer changes the recommendation entirely.
  • What is the real surface area of the bundle — plain service definitions only, or does it ship form types, validators, and Twig extensions we would come to depend on?
  • Which operations are in scope: payments, invoicing, refunds, tax, multi-currency reporting, splits and allocations with remainder handling?
  • What precision and rounding rules does finance require (ISO 4217 minor units, banker's rounding, per-currency exponents, tax-inclusive vs. exclusive display)?
  • Who is the named internal owner if we lean on the pattern, and what is the exit plan for the wrapper?
  • Do we already have money handling in production (floats in MySQL DECIMAL/DOUBLE, ad-hoc number_format calls), and what is the data volume for backfill?

Integration Approach

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.
  • Persist money as integer minor units in a BIGINT column plus an ISO 4217 CHAR(3) currency column. Never FLOAT/DOUBLE, never a bare DECIMAL without an accompanying currency.
  • Provide an Eloquent custom cast (e.g. MoneyCast) mapping the two columns to a Money object and back, so domain code never touches raw integers or floats.
  • Add a NumberFormatter-based presenter for locale-aware display, and validation rules for currency codes and amount ranges at the boundary.
  • Keep allocation/split logic (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.

  1. ADR: canonical monetary representation, rounding policy, and named ownership.
  2. PoC: cast + validator + formatter + allocation, with a test suite of known-tricky cases (0.1 + 0.2, currencies with 0 and 3 exponents, negative amounts, splits with remainders).
  3. Instrument the highest-risk paths first — payment capture, refunds, invoicing, tax — where an off-by-one minor unit is a financial event.
  4. Backfill: dual-write or shadow-read on the new representation, reconcile against legacy values, then cut over.
  5. Remove float handling and ad-hoc number_format calls; add a static-analysis rule to prevent reintroduction.
  6. Only then touch the legacy Symfony2 surface, if it is still in scope.

Operational Impact

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:

  • Rounding drift on splits and tax — visible only after reconciliation.
  • Float coercion reintroduced through a careless cast or raw SQL.
  • Mixed-currency arithmetic that the type system would catch but untyped adapters will not.
  • Stale ISO 4217 currency list (new currencies, exponent changes).
  • EOL PHP runtime with no security patching — the whole stack, not just this package.
  • In the bundle specifically: an abandoned fork with a name mismatch means supply-chain review will flag it anyway.

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.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
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