peso / bnr-service
National Bank of Romania data provider for Peso
1.0.0
2025-09-26 20:30 UTC
Requires
- php: ^8.2
- arokettu/date: ^2.4
- arokettu/system-clock: ^2.0
- peso/core: ^1.4
- psr/clock: ^1.0
- psr/http-client: ^1.0
- psr/http-client-implementation: ^1.0
- psr/http-factory: ^1.0
- psr/simple-cache: ^1 || ^2 || ^3
- sabre/xml: ^4.0
Requires (Dev)
- arokettu/clock: ^2.7
- guzzlehttp/guzzle: ^7.10
- php-http/discovery: ^1.20
- php-http/mock-client: ^1.6
- phpunit/phpunit: ^11.5
- psy/psysh: *
- sandfox.dev/code-standard: ^1.2025.09.17
- squizlabs/php_codesniffer: *
- symfony/cache: ^7.3
- vimeo/psalm: ^6.13
This package is auto-updated.
Last update: 2025-09-26 20:32:15 UTC
README
This is an exchange data provider for Peso that retrieves data from the National Bank of Romania.
Installation
composer require peso/bnr-service
Install the service with all recommended dependencies:
composer install peso/bnr-service php-http/discovery guzzlehttp/guzzle symfony/cache
Example
<?php use Peso\Peso\CurrencyConverter; use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Psr16Cache; require __DIR__ . '/vendor/autoload.php'; $cache = new Psr16Cache(new FilesystemAdapter(directory: __DIR__ . '/cache')); $service = new \Peso\Services\NationalBankOfRomaniaService($cache); $converter = new CurrencyConverter($service);
Documentation
Read the full documentation here: https://phpeso.org/v1.x/services/bnr.html
Support
Please file issues on our main repo at GitHub: https://github.com/phpeso/bnr-service/issues
License
The library is available as open source under the terms of the MIT License.