Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Currency Rate Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Do we need conversion only, or historical rates, settlement-grade precision, and audit trails? The latter rule this package out entirely.
  • Is ECB-only acceptable, or is CBR a hard requirement from a stakeholder? This is a product decision before it is a technical one.
  • What is the acceptable staleness window, and what should the UI do when rates are older than that?
  • Build vs. buy: a maintained Laravel/PHP rates package or a thin in-house client against ECB's published feed may both be cheaper than adopting this.

Integration Approach

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:

  1. Replace — use an actively maintained composer package with Laravel support; fastest if it covers ECB out of the box.
  2. Wrap — keep the bundle as a vendor dependency in a non-Laravel worker/service if the org already runs Symfony somewhere; call it over HTTP. Only sensible if a Symfony footprint already exists, which the 0-dependent count suggests it does not.
  3. Reimplement — port the ECB/CBR fetching into ~200–400 lines of Laravel code behind an interface. Given the small surface area, this is usually the right answer and removes the dependency entirely.

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.

  1. Spike (1–2 days): confirm ECB feed shape, confirm whether CBR is required, decide build vs. buy.
  2. Contract + cache schema: define the provider interface, rate storage, and staleness fields before writing fetchers.
  3. ECB adapter + scheduled refresh with last-known-good persistence.
  4. Conversion service with explicit rounding and minor-unit handling, plus unit tests on known rate fixtures.
  5. Optional CBR adapter behind a feature flag, subject to the compliance review above.
  6. Observability: refresh success/failure metrics and a staleness alert before this reaches any pricing path.

Operational Impact

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.

  • Upstream outage or timeout on ECB/CBR — must degrade to last-known-good rates, never block checkout or quote generation on a synchronous fetch.
  • Silent format drift in a provider response — parsing yields zeros or wrong magnitudes; needs schema assertions and a "rate moved more than X%" sanity alarm.
  • Stale rates served as fresh — requires an explicit fetched_at and a staleness threshold surfaced to the UI and to any pricing logic.
  • Rounding/precision defects — float arithmetic on money produces off-by-a-cent errors that surface as reconciliation breaks; enforce integer minor units and a documented rounding rule.
  • Dependency rot — the abandoned Guzzle/Symfony pins become a security finding at the next audit.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core