Skip to content

Commit 927aabb

Browse files
committed
Readd httplug deps as we use interface in Client
1 parent 9a182a9 commit 927aabb

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"require": {
1212
"php": "^7.1",
1313
"nyholm/psr7": "^1.0",
14+
"php-http/httplug": "^2.0",
1415
"psr/http-client": "^1.0",
1516
"symfony/options-resolver": "^2.6 || ^3.0 || ^4.0"
1617
},

src/Client.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,16 @@ class Client implements HttpClient
4747
* @var int $ssl_method Crypto method for ssl/tls, see PHP doc, defaults to STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
4848
* }
4949
*/
50-
public function __construct(array $config = [])
50+
public function __construct($config1 = [], $config2 = null, array $config = [])
5151
{
52+
if (\is_array($config1)) {
53+
$this->config = $this->configure($config1);
54+
55+
return;
56+
}
57+
58+
@trigger_error(E_USER_DEPRECATED, 'Passing a Psr\Http\Message\ResponseFactoryInterface and a Psr\Http\Message\StreamFactoryInterface to SocketClient is deprecated, and will be removed in 3.0, you should only pass config options.');
59+
5260
$this->config = $this->configure($config);
5361
}
5462

0 commit comments

Comments
 (0)