flagbit/currency-bundle
Flagbit CurrencyBundle is a PHP/Symfony bundle for handling currencies and exchange rates. It provides services for currency conversion, formatting, and managing currency data, helping applications display and calculate monetary values reliably across multiple currencies.
The first thing to establish is that this is a Symfony bundle, not a Laravel package. It ships a Bundle class, a DependencyInjection/Extension, and YAML configuration. There is no service provider, no facade, and no config file Laravel will read. If you are evaluating it for a Laravel app, the realistic answer is: read it for design ideas, then reimplement the ~200 lines you actually need with NumberFormatter and a rate table.
If you are in a Symfony (or Symfony-in-Laravel-via-bridge) context:
composer require flagbit/currency-bundle — expect resolution failures on modern PHP/Symfony; it predates the Symfony 5+ skeleton conventions and is archived, so treat the version constraint as a research exercise first.config/bundles.php (or legacy AppKernel).config/packages/flagbit_currency.yaml with a base currency and a rate map.DependencyInjection/Configuration.php (the authoritative list of config keys — the README is usually stale), and the CurrencyManager/converter service class under src/ or Model/. Those tell you the real API in under five minutes.1 234,50 € versus €1,234.50.MoneyFormatter/PricePresenter class of your own and let the rest of the app depend on that. When the bundle dies — and it will — you swap one class instead of grepping 40 controllers.{{ price|currency('EUR') }}-style output, but keep business logic in PHP. Filters hide rounding decisions, which is exactly where currency bugs live.(amount_minor, currency_code) as a pair, resolve the display currency from session/locale/geo once per request, and pass it explicitly through your presenter rather than reading globals inside a template.float, round only at the final formatting step and use NumberFormatter::formatCurrency, never string concatenation. Better: keep integer cents in your own model and use the bundle only for the format call.NumberFormatter handles locale grouping, symbol placement, and minor-unit counts (JPY has 0 decimals, KWD has 3). Many homegrown "currency helpers" hardcode 2 decimals and are wrong for ~15 currencies. Whatever you build, get this from ICU.1 base = X target or the inverse by converting 1 EUR→USD and sanity-checking the number. Also confirm the bundle's rounding mode; some implementations truncate.bin/console debug:container | grep -i currenc to find the real service id, and debug:config flagbit_currency to confirm your YAML was merged as expected.composer require symfony/intl gives you NumberFormatter and Currencies; a small Money value object plus a cached rate repository covers 95% of what this bundle does, with active maintenance and PHP 8 support.How can I help you explore Laravel packages today?