florianv/swap-bundle
Symfony bundle for the Swap currency exchange library. It integrates exchange-rate providers into Symfony, enabling currency conversion, rate lookup, and configurable provider and caching setup through a simple service-oriented API.
florianv/swap library, so the real decision is "adopt the library + ~a day of wiring" versus "own a small internal FX service." For indicative/display pricing, that's an easy buy.florianv/swap directly and write a small service provider — same capability, one less opinionated layer. Treat this repo as the reference implementation and the library as the dependency.florianv/swap directly; this bundle adds Symfony-only surface area.To executives: Currency conversion is a commodity capability — we should not build or staff it. This is a small, MIT-licensed integration that gives us multi-provider rates with automatic failover and caching, turning a multi-week infrastructure item into roughly a day of configuration. It also removes single-vendor risk, since switching providers is a config change rather than a rewrite. The tradeoff is honest: it is a small, low-adoption open-source project, so we pin versions and keep the integration thin enough to replace. The recent 6.0.0 release is a good signal — the maintainer modernized the toolchain (current PHP/Symfony support, static analysis in CI, automated backward-compatibility checks) rather than letting it drift. The catch is that it is a breaking release: it requires PHP 8.2+ and Symfony 6.4+, which fits our stack but means no support for older services.
To engineering: The bundle is a configuration and DI layer over florianv/swap; the real dependency is the library. That means low lock-in and a clean exit — we depend on an interface, not an implementation. Two things to plan for: it is Symfony-only (on Laravel we take the library and write our own service provider), and with 0 dependents we should still spike it and pin the version. 6.0.0 removed a lot of legacy baggage — PHP <8.2, Symfony <6.4, PHPUnit 5–9, the Guzzle 6 adapter (now php-http/guzzle7-adapter), and the old Travis config — so upgrading is a floor bump, not a feature change; budget for dependency alignment and re-running the test suite. Wrap it behind our own CurrencyConverter contract so a future swap-out is a one-file change. Caching TTL and the provider fallback order should be reviewed as product decisions, not left as default config.
How can I help you explore Laravel packages today?