peso / fixer-service
Fixer.io data provider for Peso
1.1.1
2025-07-30 14:52 UTC
Requires
- php: ^8.2
- arokettu/date: ^2.4
- peso/core: ^1.1
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- psr/simple-cache: ^1 || ^2 || ^3
Requires (Dev)
- guzzlehttp/guzzle: ^7.9
- php-http/discovery: ^1.20
- php-http/mock-client: ^1.6
- phpunit/phpunit: ^11.5
- psy/psysh: *
- sandfox.dev/code-standard: ^1.2025.06.29
- squizlabs/php_codesniffer: *
- symfony/cache: ^7.3
- vimeo/psalm: ^6.12
This package is auto-updated.
Last update: 2025-09-30 15:07:32 UTC
README
This is an exchange data provider for Peso that retrieves data from Fixer.
Installation
composer require peso/fixer-service
Install the service with all recommended dependencies:
composer install peso/fixer-service php-http/discovery guzzlehttp/guzzle symfony/cache
Example
<?php use Peso\Peso\CurrencyConverter; use Peso\Services\Fixer\AccessKeyType; use Peso\Services\FixerService; 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 FixerService('...', AccessKeyType::Free, cache: $cache); $converter = new CurrencyConverter($service); // 14419.61 as of 2025-06-20 echo $converter->convert('12500', 'EUR', 'USD', 2), PHP_EOL;
Documentation
Read the full documentation here: https://phpeso.org/v1.x/services/fixer.html
Support
Please file issues on our main repo at GitHub: https://github.com/phpeso/fixer-service/issues
License
The library is available as open source under the terms of the MIT License.