redcode/currency-rate-bundle
RedCode CurrencyRateBundle provides currency exchange rate retrieval and management for PHP/Symfony applications, with configurable providers and caching to support reliable conversions and up-to-date rate data.
Architecture fit — the headline risk. This package is a Symfony2 bundle, not a Laravel package. It ships a DependencyInjection extension, services.xml wiring, and a bundle class registered in AppKernel — none of which Laravel's container, package discovery, or service provider model understands. There is no Illuminate\Support\ServiceProvider, no config publishing, no facade. Treating this as a drop-in dependency for a Laravel application is not viable; the realistic value is as a reference implementation for ECB/CBR endpoint handling and conversion logic, not as an installed library.
What's actually reusable. The domain core is small and worth reading: two HTTP providers (ECB reference rates, CBR daily rates) and a conversion service. That logic is a few hundred lines and can be lifted, wrapped, or reimplemented in a Laravel-native service in days rather than weeks. The bundle's value is in documenting the upstream formats and quirks, not in its integration surface.
Integration feasibility — low, with real conflicts. A Symfony2-era bundle will constrain to PHP 5.x/7.x and Symfony ~2.3–2.8, and likely pins Guzzle 3.x. Modern Laravel (10/11) requires PHP 8.1+ and Guzzle 7. Composer resolution will almost certainly fail against a current application, and forcing it via --ignore-platform-reqs would leave an unmaintained HTTP stack in the dependency graph. Even in isolation, the library has zero dependents and 3 stars, so there is no evidence of anyone running it in production anywhere.
Technical risk — concentrated in the data source, not the code. The conversion arithmetic is trivial; the risk is upstream. ECB and CBR have both changed feed formats and access paths over time, and CBR specifically introduces a compliance dimension: sourcing reference rates from a Russian central bank feed for anything customer-facing or regulated warrants a legal/product review, and a primary/fallback provider strategy that does not depend on it. Secondary risks: monetary precision (float-based conversion vs. integer minor units and explicit rounding policy), no historical-rate storage, and no staleness signalling on cached rates.
Key questions for the team.
Stack fit. Do not install this bundle. The correct integration pattern is a Laravel-native CurrencyRateProvider contract with two adapters (ECB, optional CBR), an ExchangeRateService for conversion, and a scheduled refresh command writing into cache or a exchange_rates table. The bundle's provider classes serve as a specification for endpoint URLs, response shapes, and error handling — port the behavior, not the code.
Migration path. Three viable options, in ascending order of effort:
Compatibility. Expect hard failures on PHP 8.x and Guzzle 7. Any internal fork must be re-tested against current PHP, add strict types, and replace the abandoned HTTP layer. Budget for that work explicitly rather than discovering it mid-sprint.
Sequencing.
Maintenance. Effectively unmaintained: last release 2022, 3 stars, no dependents, no evidence of an active maintainer. Adopting it means owning it — security patches, PHP upgrades, and upstream format changes all become internal work. There is no realistic path to upstreaming fixes.
Support. No vendor, no community, no meaningful issue history to learn from. Documentation is a README at best. Internal engineers will be debugging against ECB/CBR documentation directly regardless, which further weakens the case for the dependency.
Scaling. Not a concern in the usual sense. Rate data is low-volume and highly cacheable — one refresh per interval per currency pair, served from Redis or the database. Throughput on the conversion path is CPU-trivial. The scaling question is cache correctness and invalidation, not load.
Failure modes.
fetched_at and a staleness threshold surfaced to the UI and to any pricing logic.Ramp-up. Low for the code itself — a mid-level engineer can read and port the whole library in a day. The real ramp-up is domain: currency precision rules, which pairs and directions the business needs, staleness tolerance for pricing, and the compliance position on CBR. Those are product and finance conversations, not engineering ones, and they should happen before the build-vs-buy call rather than after.
Recommendation. Do not adopt as a dependency. Use it as a design reference, reimplement the ECB path natively in Laravel behind a provider interface, treat CBR as an optional flag pending compliance sign-off, and invest the saved integration effort in staleness handling and rounding correctness — the two places where currency features actually break in production.
How can I help you explore Laravel packages today?