Skip to content

Commit ea4b321

Browse files
committed
Merge pull request #15 from php-http/update_dependencies
Update dependencies
2 parents 126b3a7 + dd79007 commit ea4b321

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

composer.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,16 @@
1212
"php": ">=5.4",
1313
"symfony/options-resolver": "^2.6|^3.0",
1414
"php-http/httplug": "^1.0",
15-
"php-http/message-factory": "^1.0.2"
15+
"php-http/message-factory": "^1.0.2",
16+
"php-http/discovery": "^0.8"
1617
},
1718
"require-dev": {
1819
"phpunit/phpunit": "^4.8",
1920
"guzzlehttp/psr7": "^1.2",
20-
"php-http/discovery": "^0.8@dev",
21-
"php-http/adapter-integration-tests": "dev-master",
22-
"php-http/message": "^0.2@dev",
23-
"php-http/client-common": "0.2.0"
24-
},
25-
"suggest": {
26-
"php-http/discovery": "Used for message factory discovery"
21+
"php-http/adapter-integration-tests": "~0.3.1",
22+
"php-http/message": "^1.0",
23+
"php-http/client-common": "^1.0",
24+
"puli/composer-plugin": "1.0.0-beta9"
2725
},
2826
"provide": {
2927
"php-http/client-implementation": "1.0"

puli.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
},
4545
"php-http/discovery": {
4646
"install-path": "vendor/php-http/discovery",
47-
"installer": "composer",
48-
"env": "dev"
47+
"installer": "composer"
4948
},
5049
"php-http/httplug": {
5150
"install-path": "vendor/php-http/httplug",

src/Client.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Http\Client\Exception\NetworkException;
66
use Http\Client\HttpClient;
77
use Http\Discovery\MessageFactoryDiscovery;
8-
use Http\Message\MessageFactory;
98
use Http\Message\ResponseFactory;
109
use Psr\Http\Message\RequestInterface;
1110
use Symfony\Component\OptionsResolver\Options;
@@ -47,15 +46,9 @@ class Client implements HttpClient
4746
* @var int $write_buffer_size Buffer when writing the request body, defaults to 8192
4847
* @var int $ssl_method Crypto method for ssl/tls, see PHP doc, defaults to STREAM_CRYPTO_METHOD_TLS_CLIENT
4948
* }
50-
*
51-
* @throws \LogicException When MessageFactory is not provided and cannot be discovered
5249
*/
5350
public function __construct(ResponseFactory $responseFactory = null, array $config = [])
5451
{
55-
if (null === $responseFactory && !class_exists('\Http\Discovery\MessageFactoryDiscovery')) {
56-
throw new \LogicException('No response factory provided and no discovery service is present to guess it, maybe you need to install php-http/discovery package?');
57-
}
58-
5952
if (null === $responseFactory) {
6053
$responseFactory = MessageFactoryDiscovery::find();
6154
}

0 commit comments

Comments
 (0)