Skip to content

Commit

Permalink
Fix compatibility with php-http/mock-client: ^1.5
Browse files Browse the repository at this point in the history
Resolves: #29
  • Loading branch information
JaZo committed Aug 30, 2021
1 parent 68f2ceb commit 543b47a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip

## Unreleased

- Nothing
### Fixed
- Fixed compatibility with `php-http/mock-client: ^1.5`

## [2.3.0] - 2021-07-12

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"php": "^7.2|^8.0",
"danielstjules/stringy": "^3.1",
"php-http/discovery": "^1.4",
"php-http/mock-client": "^1.2",
"php-http/mock-client": "^1.5",
"psr/http-message": "^1.0"
},
"require-dev": {
Expand Down
5 changes: 3 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Http\Message\ResponseFactory;
use Http\Mock\Client as MockClient;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

class Client extends MockClient
{
Expand All @@ -27,10 +28,10 @@ public function __construct(ResponseBuilderInterface $fixtureResponseBuilder, Re
/**
* {@inheritdoc}
*/
public function doSendRequest(RequestInterface $request)
public function sendRequest(RequestInterface $request): ResponseInterface
{
$this->setDefaultResponse($this->fixtureResponseBuilder->build($request));

return parent::doSendRequest($request);
return parent::sendRequest($request);
}
}

0 comments on commit 543b47a

Please sign in to comment.