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.
Supersedes the prior assessment. Release 6.0.0 reviewed; the core verdict is unchanged, but three deltas are material: a PHP floor bump, a Symfony floor bump, and meaningfully improved engineering hygiene.
Architecture fit
SwapExtension, service definitions, and compiler passes reading config/packages/swap.yaml. Laravel has no bundle-extension lifecycle, so the package itself will not boot in Laravel. 6.0.0 does not change this; it reinforces it by typing FlorianvSwapExtension::load() to the Symfony 6.4+ signature (array $configs, ContainerBuilder $container): void), which is a ContainerBuilder API that Laravel does not expose.florianv/swap — framework-agnostic provider adapters, CurrencyPair construction, fallback, PSR-6/PSR-16 caching. The bundle remains a thin config surface.Configuration.php, so the bundle is now a cleaner, smaller reference implementation than it was at 5.5.0. That slightly improves its value in the one role we actually care about.florianv/swap. In a Symfony service, it is a genuine drop-in — and now specifically a Symfony 6.4/7.x/8.x drop-in.Integration feasibility
florianv/swap itself carries the same floor — that is the package a Laravel consumer actually installs, and these release notes describe only the bundle.php-http/guzzle6-adapter → php-http/guzzle7-adapter. Irrelevant in Laravel (we wire Guzzle 7 or symfony/http-client directly), but it removes a stale transitively-pulled adapter that could otherwise surface in a dependency audit.Illuminate\Contracts\Cache\Repository PSR-16 adapter. Fallback chains and provider config translate cleanly to config/swap.php.Technical risk
florianv/swap (not just the bundle) carry that floor?6.0.0 tag actually contains Symfony 8 support end-to-end — the release notes cite PR #61 for the feature while the contributor list references #55 and #57. Worth a one-line tag inspection before we treat Symfony 8 as a supported target.Stack fit
florianv/swap and rebuild the bundle's behavior:
SwapServiceProvider binding a singleton SwapInterface (or a narrower CurrencyConverter contract).config/swap.php mirroring the bundle's provider/fallback/cache keys, so config semantics stay recognizable to anyone reading upstream docs.(base, quote, date).symfony/http-client or Guzzle 7, with explicit connect/read timeouts and a per-provider retry budget. Pin Guzzle 7 to match the adapter the bundle now standardizes on.convert(Money $from, Currency $to): Money in our own namespace; never let Swap\ types leak into controllers, models, or Blade. This is what makes a future provider swap or library replacement a non-event.Migration path
florianv/swap's own constraints, confirm no legacy Symfony 5.4 service is in scope.CurrencyConverter contract, rounding policy as a named, tested rule.If the team ever consolidates onto Symfony, the bundle is a drop-in for 6.4+ and the wrapper survives unchanged — the wrapper is the migration insurance.
Compatibility
Sequencing
Maintenance
florianv/swap is a contained change. Bus factor is modestly improved by the new contributors and CI investment, but forkability is still the actual continuity plan, not vendor support.Support
Scaling
(base, quote, date) with TTL segmented by use case: minutes-to-hours for display, longer for settlement with explicit provenance recorded.Failure modes
Ramp-up
How can I help you explore Laravel packages today?