Skip to content

Commit 543b47a

Browse files
committed
Fix compatibility with php-http/mock-client: ^1.5
Resolves: #29
1 parent 68f2ceb commit 543b47a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
66

77
## Unreleased
88

9-
- Nothing
9+
### Fixed
10+
- Fixed compatibility with `php-http/mock-client: ^1.5`
1011

1112
## [2.3.0] - 2021-07-12
1213

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"php": "^7.2|^8.0",
2626
"danielstjules/stringy": "^3.1",
2727
"php-http/discovery": "^1.4",
28-
"php-http/mock-client": "^1.2",
28+
"php-http/mock-client": "^1.5",
2929
"psr/http-message": "^1.0"
3030
},
3131
"require-dev": {

src/Client.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Http\Message\ResponseFactory;
66
use Http\Mock\Client as MockClient;
77
use Psr\Http\Message\RequestInterface;
8+
use Psr\Http\Message\ResponseInterface;
89

910
class Client extends MockClient
1011
{
@@ -27,10 +28,10 @@ public function __construct(ResponseBuilderInterface $fixtureResponseBuilder, Re
2728
/**
2829
* {@inheritdoc}
2930
*/
30-
public function doSendRequest(RequestInterface $request)
31+
public function sendRequest(RequestInterface $request): ResponseInterface
3132
{
3233
$this->setDefaultResponse($this->fixtureResponseBuilder->build($request));
3334

34-
return parent::doSendRequest($request);
35+
return parent::sendRequest($request);
3536
}
3637
}

0 commit comments

Comments
 (0)