Skip to content

Commit 500daae

Browse files
authored
Merge pull request #6 from swisnl/feature/httplug-2.0
Add support for HTTPlug 2.0 and PSR-18
2 parents f36dc4a + 6b6f1ad commit 500daae

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to `swisnl/php-http-fixture-client` will be documented in th
44

55
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
66

7+
## Unreleased
8+
9+
### Added
10+
- Add support for HTTPlug 2.0 and [PSR-18](https://www.php-fig.org/psr/psr-18/)
11+
712
## [2.1.0] - 2018-10-05
813

914
### Added

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"php-http",
99
"fixture",
1010
"client",
11-
"psr-7"
11+
"psr-7",
12+
"psr-18"
1213
],
1314
"homepage": "https://github.com/swisnl/php-http-fixture-client",
1415
"license": "MIT",
@@ -24,7 +25,7 @@
2425
"php": "^7.0",
2526
"danielstjules/stringy": "^3.1",
2627
"php-http/discovery": "^1.4",
27-
"php-http/mock-client": "^1.1",
28+
"php-http/mock-client": "^1.2",
2829
"psr/http-message": "^1.0"
2930
},
3031
"require-dev": {
@@ -34,7 +35,8 @@
3435
},
3536
"provide": {
3637
"php-http/async-client-implementation": "1.0",
37-
"php-http/client-implementation": "1.0"
38+
"php-http/client-implementation": "1.0",
39+
"psr/http-client-implementation": "1.0"
3840
},
3941
"autoload": {
4042
"psr-4": {

src/Client.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,12 @@ public function __construct(ResponseBuilderInterface $fixtureResponseBuilder, Re
2525
}
2626

2727
/**
28-
* @param \Psr\Http\Message\RequestInterface $request
29-
*
30-
* @throws \Http\Client\Exception
31-
* @throws \Exception
32-
*
33-
* @return \Psr\Http\Message\ResponseInterface|mixed|null
28+
* {@inheritdoc}
3429
*/
35-
public function sendRequest(RequestInterface $request)
30+
public function doSendRequest(RequestInterface $request)
3631
{
3732
$this->setDefaultResponse($this->fixtureResponseBuilder->build($request));
3833

39-
return parent::sendRequest($request);
34+
return parent::doSendRequest($request);
4035
}
4136
}

0 commit comments

Comments
 (0)