diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a0147a..b834c72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.7.3] - 2024-01-30 + +- Use Psr18ClientDiscovery instead of deprecated HttpClientDiscovery + ## [1.7.0] - 2023-05-16 - Support sandbox message endpoints. Examples [here](examples/sandbox/messages.php) diff --git a/src/HttpClient/HttpClientBuilder.php b/src/HttpClient/HttpClientBuilder.php index 4fd2a7d..0fbeffb 100644 --- a/src/HttpClient/HttpClientBuilder.php +++ b/src/HttpClient/HttpClientBuilder.php @@ -8,8 +8,8 @@ use Http\Client\Common\HttpMethodsClientInterface; use Http\Client\Common\Plugin; use Http\Client\Common\PluginClientFactory; -use Http\Discovery\HttpClientDiscovery; use Http\Discovery\Psr17FactoryDiscovery; +use Http\Discovery\Psr18ClientDiscovery; use Http\Message\Authentication\Bearer; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; @@ -33,7 +33,7 @@ public function __construct( StreamFactoryInterface $streamFactory = null ) { $this->apiToken = $apiToken; - $this->httpClient = $httpClient ?? HttpClientDiscovery::find(); + $this->httpClient = $httpClient ?? Psr18ClientDiscovery::find(); $this->requestFactory = $requestFactory ?? Psr17FactoryDiscovery::findRequestFactory(); $this->streamFactory = $streamFactory ?? Psr17FactoryDiscovery::findStreamFactory(); }