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

yceruto/money-bundle

A Symfony bundle that integrates MoneyPHP into your app, offering form types, Twig extensions, Doctrine mapping, validators, and serializers for handling monetary amounts and currencies safely and consistently.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — the framing mismatch is the headline. Despite the brief describing this as a "Laravel/PHP package," yceruto/money-bundle is a Symfony bundle: it ships a Bundle class, a DI Extension, and a configuration tree that registers moneyphp services into the Symfony container. It has no service provider, no facade, no config file compatible with Laravel. If the target stack is Laravel, this package is not adoptable as-is and should be evaluated as a reference implementation rather than a dependency. If the target stack is Symfony, it is a clean, idiomatic fit.

Where the actual value sits. The substantive functionality lives in moneyphp/money — integer minor-unit arithmetic, ISO 4217 currency handling, allocation/splitting without rounding drift, and parsers/formatters. The bundle is thin glue: a few service definitions, aliases, and configuration defaults. That is good news for lock-in: the wrapper is small enough that "vendor the config into our own service provider" is a realistic fallback if the bundle stalls.

Integration feasibility. Low-to-moderate effort on Symfony: composer require, enable the bundle, configure default currency and parsers/formatters, inject MoneyFactory/CurrencyConverter where needed. The real effort is not the install — it is retrofitting Money value objects into code paths that currently use floats, DECIMAL strings, or bare integers. That work is identical regardless of whether the bundle is used.

Technical risk.

  • Bus factor / adoption: 29 stars and effectively a single maintainer (Yonel Ceruto, a well-regarded Symfony contributor). Low adoption means fewer eyes on edge cases and a real chance of abandonment.
  • Version coupling: bundle config and service definitions are tied to Symfony major versions; confirm support for our specific Symfony/PHP constraint before committing, and re-verify at each framework upgrade.
  • Correctness risk dominates runtime risk: rounding policy, allocation remainders, and currency mismatches are the failure surface, not throughput.
  • License: MIT — no legal friction.

Key questions to resolve before committing.

  1. Is our target stack actually Symfony, or Laravel? A "no" here ends the evaluation of the bundle itself, not of moneyphp.
  2. What Symfony and PHP versions are in the support matrix, and do they match our LTS?
  3. Does our persistence layer store amounts as integer minor units plus an ISO currency code, or as floats/decimals? If floats, a data migration is the real project.
  4. Who owns money-domain semantics (rounding rules, tax allocation, FX) on the team — and is that person available during design, not just implementation?
  5. Do we need multi-currency and FX conversion now, or is CurrencyConverter speculative scope?

Integration Approach

Stack fit. Treat this as two decisions, not one:

  • Symfony stack: adopt the bundle — it is the intended usage and eliminates boilerplate.
  • Laravel stack: do not adopt the bundle. Depend on moneyphp/money directly and hand-write a small service provider binding a singleton MoneyFactory, formatters, and any configured currency list. This is a few dozen lines and avoids a dead dependency. Optionally mine the bundle's config tree as a spec for what to expose.

Migration path (the part that actually costs money).

  1. Spike first. One vertical slice — a single price-bearing entity or endpoint — using moneyphp end-to-end: creation, arithmetic, persistence, serialization. Do this before any package commitment.
  2. Establish the storage contract. Amount as BIGINT minor units + CHAR(3) currency column. Never floats. If legacy float/decimal columns exist, plan a backfill with an explicit rounding policy signed off by finance/product, not by engineering alone.
  3. Introduce Money at the domain boundary. Convert at the edges (HTTP request → Money, DB row → Money), keep it through the domain, serialize to a documented shape at the API boundary ({amount: "1234", currency: "USD"} as minor units — state the convention explicitly in the API docs or you will get a bug report).
  4. Roll out domain by domain, highest-value/highest-risk first (pricing, payments, refunds, invoicing), leaving reporting/analytics on existing types until the core is stable.

Compatibility and sequencing.

  • Pin moneyphp/money and the bundle to explicit versions; do not float constraints on a low-adoption package.
  • Sequence: spike → storage contract → domain adoption → API contract → presentation/formatting → cleanup of legacy float paths. Do not parallelize storage migration and API reshaping.
  • Verify bundle registration works cleanly under our container compilation and caching setup (including any multi-kernel or test-environment config) before wide rollout.

Operational Impact

Maintenance. Small surface area, MIT license, no vendor account, no cost — but also no SLA. Realistic posture: pin versions, expect to own the code path, and budget a half-day per Symfony major upgrade to confirm the bundle's config and service definitions still compile. If the bundle goes stale, the escape hatch is cheap: inline its configuration into our own container setup and keep moneyphp as the direct dependency. That exit cost is why the low star count is tolerable here.

Support. Community-only: GitHub issues, no commercial backing. Internal ownership must be assigned to a named engineer or the domain will silently drift back to floats. Document the rounding and allocation conventions in-repo — they are the institutional knowledge that outlives the package.

Scaling. Negligible runtime overhead — Money is a lightweight immutable value object, and formatting/parsing is CPU-trivial at typical request volumes. Scaling concerns are correctness and data volume, not compute: large table backfills on the amount/currency migration, and index/query implications of the new composite columns. Cache currency metadata and formatted display strings if presentation is hot.

Failure modes to instrument and guard.

  • Currency mismatch exceptions at runtime (arithmetic between differing currencies) — most likely in aggregation and reporting code paths; fail loudly in tests, not in production.
  • Rounding and allocation drift in splits, refunds, and tax — cover with property-based tests asserting totals always reconcile to the original amount.
  • Serialization leakage — a float creeping back into the API payload or a JS client re-introducing float math on minor units.
  • Bundle/config drift at framework upgrade, surfacing as container compile errors rather than runtime ones (preferable, but it blocks deploys).
  • Single-maintainer stall — mitigated by the small wrapper footprint; detect via a stalled dependency and a security advisory on moneyphp.

Ramp-up. Low technical ramp for Symfony developers — a day to wire the bundle and a day to learn the Money API. The expensive ramp is conceptual: the team must internalize minor units, currency-aware arithmetic, allocation-with-remainder, and where rounding is allowed to happen. Budget for a short internal design note plus a review checklist (no floats, no cross-currency math, explicit currency at every boundary). That documentation will prevent more incidents than the package choice will.

Recommendation. Worth adopting only on a Symfony codebase, and worth adopting primarily as a convenience around moneyphp — evaluate and justify moneyphp on its own merits. On Laravel, reject the bundle and take moneyphp directly. In both cases, the decisive risk is not the 29 stars; it is whether the team commits to integer minor units and a single, documented rounding policy.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style