moneyphp/money-bundle
Symfony bundle integrating the Money PHP library, providing service configuration, a Twig extension, form type, and validator for handling monetary values and currencies safely across your application.
Architecture fit. Unchanged in shape: the package is a thin integration layer over moneyphp/money, contributing a bundle class, DI service definitions for formatters/parsers, a Twig extension, a form type, and a validator. v0.1.0 adds one more item to that list — a service definition of ISO currencies — which is a DI-provided currency registry rather than business logic. Fit is still determined by whether the host app is Symfony and whether money flows through DI, Twig, and forms. In a Symfony shop, high; in a Laravel or framework-agnostic app, the bundle's value still collapses to the underlying library plus a hand-rolled service provider.
Integration feasibility. Marginally better than before. A DI-available currency list removes one recurring piece of glue work (hand-maintaining an ISO 4217 array or wiring Money::getCurrencies() yourself), and gives form types and validators a single source of currency metadata. Everything else is unchanged: composer require, enable the bundle, configure default currency and decimal places, and autowiring picks up formatter/parser. The underlying library remains independently installable, so the adopt-value-objects-first path is still valid and still the durable decision.
Technical risk. Still moderate-to-high and still concentrated in lifecycle, but the profile has shifted rather than improved. Two signals now point in opposite directions:
0.1.0, labelled "first release." That either means a re-launch, a rename, a fork re-versioned under the same name, or a history reset — and none of those are confirmed. Pre-1.0 semver permits breaking changes in any minor bump, so the API cannot be treated as stable the way a 2020-era frozen tag effectively was.The release notes say nothing about supported Symfony or PHP versions, so the primary technical risk — Composer constraint conflict on Symfony 6/7 and PHP 8.2/8.3 — is entirely unaddressed. Blast radius remains bounded: small surface, MIT licence, forkable, replaceable with a handful of service definitions. Formatting still depends on ext-intl and CLDR data, which drift with PHP releases, and now there is a second, independent data source (the bundled ISO currency list) that can drift on its own schedule.
Key questions.
composer.json declare Symfony 6/7 and PHP 8.2/8.3 support, or is the constraint set unchanged?moneyphp/money / ICU at build time? Who refreshes it when ISO 4217 changes?0.1.0 an intentional signal that the API is unstable, and what is the stated path to 1.0?moneyphp/money as the value object regardless of the bundle decision? (Still the load-bearing question.)Stack fit. Unchanged: Symfony DI, Twig, Form, Validator, plus ext-intl. The currency service definition is a natural fit for Symfony apps that need picklists, validation of submitted currency codes, or a canonical list for admin configuration screens — it is the kind of thing teams otherwise duplicate in three places. For Laravel or API-only Symfony usage, the recommendation stands: take the library, skip the bundle, implement an equivalent service provider.
Migration path. Two-track, unchanged in principle, with one addition. Adopt moneyphp/money directly and model amounts as Money with explicit currencies — that remains the durable decision and is independent of the bundle. Layer the bundle on top only where Twig/form/validator surfaces are genuinely used. If the bundle installs at v0.1.0, prefer its currency service over any in-app ISO list so there is one owner of that data; if it does not install, replicate the service definitions in-app, which now includes sourcing currency metadata from moneyphp/money rather than a copy-pasted array.
Compatibility. Still the first thing to verify and still unverified by this release. Run composer why-not against the target Symfony and PHP versions before scheduling any work, and read the new composer.json rather than inferring from the release notes, which say nothing about framework support. Confirm ext-intl in all runtime images, including CLI workers and queue consumers. Treat v0.1.0 as a moving target: pin an exact version or a narrow range, and assume minor bumps may break.
Sequencing.
moneyphp/money and migrate amount handling to value objects behind existing interfaces.Maintenance. The effort level is still low, but the ownership model needs restating. The bundle is no longer demonstrably dormant, so "treat as vendored code" is slightly too pessimistic — but pre-1.0 versioning means the team must absorb upgrade churn on the maintainer's schedule, not its own. Budget a compatibility review at each Symfony/PHP minor and at each bundle minor, and pin versions between reviews. The currency list is now a data asset the team depends on; add it to whatever process already tracks CLDR and dependency currency data.
Support. Community-only, no vendor SLA. Contributor depth is still unproven — one release, one changelog line, no stated support policy. The underlying moneyphp/money library still carries the healthier maintenance profile and remains where most long-term support risk actually sits. Expect issue response on the bundle to be slow; do not plan around it.
Scaling. Runtime cost stays negligible: value objects, formatting, and a static currency lookup. No I/O, no state, no external calls beyond ext-intl. Stateless PHP workers scale horizontally unaffected. The real scaling constraint is organizational and unchanged: one or two people hold the wiring knowledge. The new currency service slightly reduces that concentration for currency metadata specifically.
Failure modes.
Ramp-up. Short for anyone with Symfony experience; the public surface is a formatter, parser, Twig filter, form type, validator, and now a currency list. The real learning curve remains domain discipline around Money — never store floats, always pair amount with currency, decide rounding policy centrally — which is a library concern, not a bundle concern. Add one line to the internal walkthrough covering "use the shared currency service, do not add a local ISO list," and keep the lint rule or review checklist that prevents float regressions.
How can I help you explore Laravel packages today?