Skip to content

Commit 109db1d

Browse files
authored
Merge pull request #165 from Nyholm/patch-1
Make sure we check for PSR client
2 parents 4edc75b + ff76802 commit 109db1d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/HttpClientRouter.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use Http\Client\Common\Exception\HttpClientNoMatchException;
88
use Http\Client\HttpAsyncClient;
9-
use Http\Client\HttpClient;
109
use Http\Message\RequestMatcher;
1110
use Psr\Http\Client\ClientInterface;
1211
use Psr\Http\Message\RequestInterface;
@@ -43,7 +42,7 @@ public function sendAsyncRequest(RequestInterface $request)
4342
/**
4443
* Add a client to the router.
4544
*
46-
* @param HttpClient|HttpAsyncClient $client
45+
* @param ClientInterface|HttpAsyncClient $client
4746
*/
4847
public function addClient($client, RequestMatcher $requestMatcher): void
4948
{

src/PluginClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct($client, array $plugins = [], array $options = [])
7373
public function sendRequest(RequestInterface $request): ResponseInterface
7474
{
7575
// If we don't have an http client, use the async call
76-
if (!($this->client instanceof HttpClient)) {
76+
if (!($this->client instanceof ClientInterface)) {
7777
return $this->sendAsyncRequest($request)->wait();
7878
}
7979

0 commit comments

Comments
 (0)