GitPedia
florianv

florianv/swap

PHP currency conversion library for retrieving exchange rates from 30 providers, with caching and fallback. Maintained since 2014.

30 Releases
Latest: 3mo ago
Version 4.5.04.5.0Latest
alies-devalies-dev·3mo ago·March 9, 2026
GitHub

💥 Breaking Changes

  • Minimum PHP version raised to 8.2 (was 7.4/8.0)
  • Minimum PHPUnit version raised to 11.0 (was 9.x/10.x)

📦 Improvements

  • Added `suggest` section to composer.json for PSR-18 client and PSR-17 factory implementations, guiding users toward compatible HTTP dependencies
  • Improved discovery test — Now verifies discovery works end-to-end by creating a service via `Factory`

📦 Infrastructure & Tooling

  • Modernized CI pipeline — Replaced Travis CI with GitHub Actions; test matrix covers PHP 8.2, 8.3, 8.4, and 8.5
  • Added Psalm static analysis (level 1) with dedicated CI workflow and baseline
  • Added backward compatibility check workflow
  • Migrated all tests to PHPUnit 11 attributes — Replaced `@test` and `@dataProvider` annotations
  • Added composer scripts — `test`, `psalm`, `cs:fix`, `cs:check`
  • Removed legacy CI configs — `.scrutinizer.yml`, `.styleci.yml`, `.travis.yml`
  • Updated README badges — Travis badge replaced with GitHub Actions Tests and Psalm badges
  • Full Changelog: https://github.com/florianv/swap/compare/4.4.0...4.5.0
Version 4.4.04.4.0
alies-devalies-dev·3mo ago·March 9, 2026
GitHub

🐛 Bug Fixes

  • PHP 8.4 compatibility: Use explicit nullable types (?Type) instead of implicit nullable parameters, fixing deprecation notices on PHP 8.4 (Swap.php, Factory.php) #144, #147
  • Replace deprecated `HttpClientDiscovery`: Use `Psr18ClientDiscovery` instead of the deprecated `HttpClientDiscovery` in Factory.php #142

📦 Maintenance

  • New runtime dependencies: Added symfony/http-client and php-http/message-factory to require
  • New suggestion: php-http/discovery added to suggest for auto-discovery of HttpClient
  • Documentation: Multiple README and docs updates
  • Full Changelog: https://github.com/florianv/swap/compare/4.3.0...4.4.0
Version 4.3.04.3.0
florianvflorianv·5y ago·December 28, 2020
GitHub

📋 Changes

  • PHP 8 and PHPUnit 9 support
Version 4.2.04.2.0
florianvflorianv·5y ago·August 19, 2020
GitHub

xChangeApi.com support

Version 4.1.04.1.0
florianvflorianv·6y ago·June 5, 2020
GitHub

Added way to add services by instance

Version 4.0.14.0.1
florianvflorianv·7y ago·May 30, 2019
GitHub

Making Swap not final to allow mocking

Version 4.0.04.0.0
florianvflorianv·7y ago·February 12, 2019
GitHub

See CHANGELOG to get more informations about the changes in this new version

Version 3.5.03.5.0
florianvflorianv·7y ago·January 4, 2019
GitHub

📋 Changes

  • Added CurrencyConverterApi service
Fixer now requires an access key3.4.0
florianvflorianv·8y ago·April 19, 2018
GitHub

📋 Changes

  • Fixed Fixer service which now requires an access_key
Stable version of Exchanger3.3.0
florianvflorianv·8y ago·February 19, 2018
GitHub

📋 Changes

  • Added Forge service
  • Added CurrencyDataFeed service
  • Supported historical rates in National Bank Of Romania
Version 2.6.1v2.6.1
florianvflorianv·8y ago·November 10, 2017
GitHub

Fixed now invalid Google service url

Verson 3.2.03.2.0
florianvflorianv·8y ago·October 2, 2017
GitHub

Support crypto currencies via Cryptonator

Version 3.1.03.1.0
florianvflorianv·9y ago·March 27, 2017
GitHub

New Russian Central Bank service

Version 3.0.23.0.2
florianvflorianv·9y ago·December 2, 2016
GitHub

Update exchanger to include this bug fix https://github.com/florianv/exchanger/pull/5

Version 3.0.1v3.0.1
florianvflorianv·9y ago·October 8, 2016
GitHub

Update Exchanger to version 0.2.0

Version 3.0.0v3.0.0
florianvflorianv·9y ago·October 8, 2016
GitHub

📋 Changes

  • ability to retrieve historical rates
  • new provider (fixer.io)
  • architecture refactoring based on https://github.com/florianv/exchanger
v2.6.0
florianvflorianv·10y ago·June 20, 2016
GitHub
v2.5.0
florianvflorianv·10y ago·April 20, 2016
GitHub
v2.4.1
florianvflorianv·10y ago·March 28, 2016
GitHub
v2.4.0
florianvflorianv·10y ago·March 16, 2016
GitHub
v2.3.1
florianvflorianv·10y ago·March 9, 2016
GitHub
v2.3.0
florianvflorianv·10y ago·January 4, 2016
GitHub

http-adapter 1.0

Implemented ArrayProviderv2.2.0
florianvflorianv·10y ago·July 27, 2015
GitHub
v2.1.0
florianvflorianv·11y ago·June 10, 2015
GitHub

Implemented Illuminate cache

v2.0.1
florianvflorianv·11y ago·April 27, 2015
GitHub

Fixed the way to retrieve body content

v2.0.0
florianvflorianv·11y ago·January 15, 2015
GitHub

📋 Changes

  • PHP 5.4 is the minimum version
  • Used https://github.com/egeloen/ivory-http-adapter as HttpAdapter
  • Added ability to cache rates
  • Added the NationalBankOfRomania provider
v1.3.0
florianvflorianv·12y ago·June 22, 2014
GitHub

📋 Changes

  • Added a factory method CurrencyPair::createFromString
  • Simplified the retrieval of a rate
v1.2.0
florianvflorianv·12y ago·June 7, 2014
GitHub

📋 Changes

  • Added an adapter layer to support different HTTP clients
  • Moved all tests to PHPUnit
v1.1.0
florianvflorianv·12y ago·June 5, 2014
GitHub
v1.0.1
florianvflorianv·12y ago·May 31, 2014
GitHub