Skip to content

Commit

Permalink
Merge pull request #19 from railsware/fix/remove-deprecated-method
Browse files Browse the repository at this point in the history
Use Psr18ClientDiscovery instead of deprecated HttpClientDiscovery (issue)
  • Loading branch information
gaalferov authored Jan 30, 2024
2 parents ff7d496 + 5a6524f commit 4aeddaf
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 4aeddaf

Please sign in to comment.