peso / brick-rateprovider
Peso-based RateProvider class for Brick\Money
1.0.0
2025-07-22 17:28 UTC
Requires
- php: ^8.2
- brick/money: >= 0.10 < 0.11
- peso/core: ^1.1
Requires (Dev)
- phpunit/phpunit: ^11.5
- psy/psysh: *
- sandfox.dev/code-standard: ^1.2025.06.29
- squizlabs/php_codesniffer: *
- vimeo/psalm: ^6.13
This package is auto-updated.
Last update: 2025-07-22 17:28:54 UTC
README
This is a library that provides a RateProvider class for the Brick\Money based on the Peso for PHP.
Installation
composer require peso/brick-rateprovider
Example
<?php use Brick\Money\CurrencyConverter; use Brick\Money\Money; use Peso\Brick\PesoRateProvider; use Peso\Services\EuropeanCentralBankService; require __DIR__ . '/vendor/autoload.php'; $rateProvider = new PesoRateProvider(new EuropeanCentralBankService()); $converter = new CurrencyConverter($rateProvider); $eur100 = Money::of(100.00, 'EUR'); echo $converter->convert($eur100, 'USD'), PHP_EOL; // 'USD ...'
Documentation
Read the full documentation here: https://phpeso.org/v1.x/integrations/brick-rateprovider.html
Support
Please file issues on our main repo at GitHub: https://github.com/phpeso/brick-rateprovider/issues
License
The library is available as open source under the terms of the MIT License.