diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a85081..89b10d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased][unreleased] +## [2.2.1] - 2021-03-08 + +- [#198](https://github.com/SparkPost/php-sparkpost/pull/198) +- [#191](https://github.com/SparkPost/php-sparkpost/pull/191) + ## [2.2.0] - 2019-06-04 - [#187](https://github.com/SparkPost/php-sparkpost/pull/169) Updated composer.json - [#169](https://github.com/SparkPost/php-sparkpost/pull/169) Optional automatic retry on 5xx @@ -103,7 +108,8 @@ This major release included a complete refactor of the library to be a thin HTTP ### Fixed - README now has proper code blocks denoting PHP language -[unreleased]: https://github.com/sparkpost/php-sparkpost/compare/2.2.0...HEAD +[unreleased]: https://github.com/sparkpost/php-sparkpost/compare/2.2.1...HEAD +[2.2.1]: https://github.com/sparkpost/php-sparkpost/compare/2.2.0...2.2.1 [2.2.0]: https://github.com/sparkpost/php-sparkpost/compare/2.1.0...2.2.0 [2.1.0]: https://github.com/sparkpost/php-sparkpost/compare/2.0.3...2.1.0 [2.0.3]: https://github.com/sparkpost/php-sparkpost/compare/2.0.2...2.0.3 diff --git a/README.md b/README.md index c2fbf61..8150250 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,17 @@ Http\Discovery\Exception\PuliUnavailableException: Puli Factory is not available [This is usual](http://docs.php-http.org/en/latest/discovery.html#puli-factory-is-not-available). Puli is not required to use the library. You can resume running after the exception. +You can prevent the exception, by setting the discovery strategies, prior to creating the adapter object: +```php +// Prevent annoying "Puli exception" during work with xdebug / IDE +// See https://github.com/getsentry/sentry-php/issues/801 +\Http\Discovery\ClassDiscovery::setStrategies([ + // \Http\Discovery\Strategy\PuliBetaStrategy::class, // Deliberately disabled + \Http\Discovery\Strategy\CommonClassesStrategy::class, + \Http\Discovery\Strategy\CommonPsr17ClassesStrategy::class, +]); +``` + ## Setting up a Request Adapter Because of dependency collision, we have opted to use a request adapter rather than