Repository navigation
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
UnsupportedDateExceptioninstead 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
errorfield. - 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 ofarray|false|null. - Docblocks now match the code:
PhpArraytakes scalar rates,Chaintakes any iterable of services,ChainExceptionholdsThrowables, 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, plusRepositoryConventionsTestand a stricterRegistryTest. Three tests that never ran are revived, andFixerApiLayerhas tests. - New
CONTRIBUTING.md, including a policy for AI-assisted contributions, and a pull request template.
Full Changelog: 2.10.1...2.11.0