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 Exchange Bundle

Currency Exchange Bundle Laravel Package

ongr/currency-exchange-bundle

Symfony bundle for currency exchange rates and conversion, offering configurable rate providers, storage, and service-based APIs to fetch and apply exchange rates in PHP applications. Integrates with ONGR/Elasticsearch for managing currency data.

View on GitHub
Deep Wiki
Context7

ONGR Currency Exchange Bundle integrates the ongr/currency-exchange library into Symfony applications, giving you a ready-to-use service for converting monetary amounts between currencies. Configure your exchange rate providers and let the bundle handle the wiring, so your application can request conversions through a clean, injected service.

  • Seamless Symfony DI integration with the underlying exchange library
  • Configurable exchange rate providers (e.g. ECB or custom sources)
  • Simple currency conversion service available via the container
  • Extensible architecture for adding new rate sources and caches
  • Works alongside other ONGR bundles and standard Symfony tooling
Frequently asked questions about Currency Exchange Bundle
Is ongr/currency-exchange-bundle compatible with Laravel?
Not directly. It is a Symfony bundle built around Symfony bundle registration and dependency-injection configuration, so Laravel will not bootstrap it and its service wiring does not map to Laravel's container or config model. Composer installation may succeed, but you should not expect drop-in usage. Reuse is only realistic if the underlying currency services can be decoupled from the Symfony bundle wiring, typically via an extraction spike or an adapter layer.
How do I install ongr/currency-exchange-bundle in a Laravel application?
You can run composer require ongr/currency-exchange-bundle, but there is no Laravel service provider or auto-discovery, so nothing will be registered in your application. The practical path is a time-boxed spike: audit the dependency tree, try to instantiate the core conversion services outside of Symfony, and wrap whatever works behind a Laravel-native interface. If extraction proves expensive, replace it with a native Laravel client against a reputable FX provider.
Which PHP and Symfony versions does ongr/currency-exchange-bundle support?
There has been no release since 2016, so the package is almost certainly constrained to old PHP and Symfony versions. You should inspect composer.json constraints and run a dependency audit before assuming compatibility with a modern Laravel runtime such as PHP 8.2 and Laravel 10 or 11. Expect Symfony component conflicts and possible use of deprecated APIs.
Which exchange rate providers or APIs does ongr/currency-exchange-bundle call?
The bundle advertises configurable exchange-rate providers and conversion services, but the specific provider integrations are not documented in the overview. Read the source and configuration files to confirm which APIs it calls and whether they are still available or require credentials. Do not assume a specific vendor such as ECB, Fixer, or OpenExchangeRates without verifying it in the code.
Can I use its currency conversion services without Symfony bundle bootstrapping?
Possibly, but only if the domain classes are decoupled from Symfony container access and ONGR-specific assumptions. The most reliable way to find out is an isolated spike in a standalone PHP script where you attempt to instantiate and exercise the core services directly. If that fails, a fork that strips bundle-specific code is the alternative, and the FX abstraction should still be kept behind a Laravel interface so the vendor can be replaced.
Does ongr/currency-exchange-bundle require ONGR ElasticsearchBundle or Elasticsearch?
It comes from the ONGR ecosystem, so there is a real risk of coupling to ONGR Elasticsearch infrastructure. Check composer.json and the service definitions for Elasticsearch client and bundle requirements before committing to it. If Elasticsearch is required, you are adding significant operational weight for what may be a simple rate conversion requirement that Laravel cache and database tables could handle.
How are exchange rates cached, stored, and refreshed in this bundle?
The overview does not specify the caching or persistence strategy, so you need to confirm it from the source and configuration. In practice, FX rate fetching scales through caching plus a scheduled refresh rather than through the bundle itself. In Laravel you would typically add cache-backed lookups, a scheduler job for refresh, and explicit database storage of rate history for audit and reconciliation.
Is ongr/currency-exchange-bundle still maintained and safe for production?
It is effectively abandoned: no release since 2016, around three stars, and no dependents, which means little community validation or shared fixes. Adopting it means your team owns PHP and Symfony upgrades, dependency patches, provider API changes, and security remediation. Support is essentially limited to reading the code yourself, so budget for that ownership before approving it in production.
What are the alternatives to ongr/currency-exchange-bundle for currency exchange in Laravel?
The default recommendation is a native Laravel integration: call ECB, Fixer, OpenExchangeRates, or another reputable provider from a small service class, with Redis or database caching and rate-history storage. This avoids Symfony wiring and Elasticsearch overhead while giving you control over fallback behavior and observability. Keep the FX logic behind a CurrencyExchangeService interface so the provider can be swapped later.
Can I fork ongr/currency-exchange-bundle since it is MIT licensed?
Yes, the MIT license permits forking, modifying, and redistributing the code. The real cost is ownership: you become responsible for upgrades, provider changes, security patches, and documentation, and low adoption means few upstream fixes to pull in. Before forking, run the extraction spike to confirm the domain logic is worth salvaging rather than reimplementing a thin Laravel client.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo