Skip to content

Version 2.11.0

Latest

Choose a tag to compare

@alies-dev alies-dev released this 23 Oct 16:34
1e91483

What's Changed

Fixes

  • CurrencyConverter no longer includes the request URL, which carries the API key, in error messages, and rejects historical dates outside the free plan's one-year window with UnsupportedDateException instead of fetching them.
  • UniRateAPI and fastFOREX keep the HTTP status code in error messages, chain parse errors as the previous exception, and UniRateAPI no longer produces an empty message for an empty error field.
  • European Central Bank, Central Bank of the Republic of Turkey, National Bank of Denmark, National Bank of Romania and Russian Central Bank report a response without a rate date as Exchanger\Exception\Exception. Previously ECB and Turkey dated the rate "now" and the others reported an unsupported currency pair.
  • Six services (Turkey, Uzbekistan, Georgia, Belarus, Russia, Czech Republic) reject a zero or negative currency unit instead of failing with DivisionByZeroError.
  • CurrencyDataFeed and National Bank of the Republic of Belarus throw a clear exception when a rate date or the bundled currency codes cannot be read.
  • Cryptonator, CurrencyDataFeed, Forge and PhpArray check queries against Exchanger\Contract\HistoricalExchangeRateQuery, so custom implementations of the contract are recognised.

Improvements

  • ExchangeRateProvider::getExchangeRate() documents the exceptions callers may need to catch.
  • New StringUtil::xpath() helper that returns a list instead of array|false|null.
  • Docblocks now match the code: PhpArray takes scalar rates, Chain takes any iterable of services, ChainException holds Throwables, and several nullable return types are corrected.

Maintenance

  • CI runs composer cs:check, fails on PHPUnit warnings and deprecations, and all workflows use read-only permissions, concurrency, timeouts and Composer caching.
  • Psalm now analyses the tests (with psalm/plugin-phpunit), runs at error level 2, and the baseline is gone.
  • New HttpServiceContractTestCase, a shared contract test for HTTP services, plus RepositoryConventionsTest and a stricter RegistryTest. Three tests that never ran are revived, and FixerApiLayer has tests.
  • New CONTRIBUTING.md, including a policy for AI-assisted contributions, and a pull request template.

Full Changelog: 2.10.1...2.11.0