Skip to content

Commit

Permalink
Use Psr18ClientDiscovery instead of deprecated HttpClientDiscovery
Browse files Browse the repository at this point in the history
  • Loading branch information
gaalferov committed Jan 29, 2024
1 parent ff7d496 commit 5a6524f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/HttpClient/HttpClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
}
Expand Down

0 comments on commit 5a6524f

Please sign in to comment.