Skip to content

Commit 668bc6f

Browse files
Nyholmdbu
authored andcommitted
Support PSR-18
1 parent 4a818d3 commit 668bc6f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,22 @@
1111
}
1212
],
1313
"prefer-stable": true,
14-
"minimum-stability": "beta",
14+
"minimum-stability": "dev",
1515
"config": {
1616
"bin-dir": "vendor/bin"
1717
},
1818
"require": {
19-
"php": "^5.5 || ^7.0",
19+
"php": "^7.1",
2020
"ext-curl": "*",
21-
"php-http/httplug": "^1.0",
21+
"psr/http-client": "^0.3",
22+
"php-http/httplug": "^2.0",
2223
"php-http/message-factory": "^1.0.2",
2324
"php-http/message": "^1.2",
2425
"php-http/discovery": "^1.0"
2526
},
2627
"require-dev": {
2728
"guzzlehttp/psr7": "^1.0",
28-
"php-http/client-integration-tests": "^0.6",
29+
"php-http/client-integration-tests": "dev-master",
2930
"phpunit/phpunit": "^4.8.27",
3031
"zendframework/zend-diactoros": "^1.0"
3132
},

src/Client.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Http\Message\MessageFactory;
1111
use Http\Message\StreamFactory;
1212
use Http\Promise\Promise;
13+
use Psr\Http\Client\ClientInterface;
1314
use Psr\Http\Message\RequestInterface;
1415
use Psr\Http\Message\ResponseInterface;
1516

@@ -24,7 +25,7 @@
2425
*
2526
* @since 1.0
2627
*/
27-
class Client implements HttpClient, HttpAsyncClient
28+
class Client implements HttpClient, HttpAsyncClient, ClientInterface
2829
{
2930
/**
3031
* cURL options.
@@ -108,7 +109,7 @@ public function __destruct()
108109
* @since 1.6 Throw NetworkException on network errors
109110
* @since 1.0
110111
*/
111-
public function sendRequest(RequestInterface $request)
112+
public function sendRequest(RequestInterface $request): ResponseInterface
112113
{
113114
$responseBuilder = $this->createResponseBuilder();
114115
$options = $this->createCurlOptions($request, $responseBuilder);

0 commit comments

Comments
 (0)