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.
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.
Key questions to resolve before committing.
CurrencyConverter speculative scope?Stack fit. Treat this as two decisions, not one:
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).
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.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).Compatibility and sequencing.
moneyphp/money and the bundle to explicit versions; do not float constraints on a low-adoption package.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.
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.
How can I help you explore Laravel packages today?