Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 4edc424

Browse files
committed
Merge pull request #20 from php-http/discovery_upgrade
Update discovery usage
2 parents 3240547 + 5272fe4 commit 4edc424

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Change Log
22

33

4+
## 0.5.0 - 2016-02-23
5+
6+
### Added
7+
8+
- Hard discovery dependency with Puli composer plugin suggested
9+
10+
411
## 0.4.0 - 2016-01-27
512

613
### Changed

composer.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@
1717
"require": {
1818
"php": ">=5.4",
1919
"php-http/httplug": "^1.0",
20-
"guzzlehttp/guzzle": "^5.1"
20+
"guzzlehttp/guzzle": "^5.1",
21+
"php-http/discovery": "^0.8"
2122
},
2223
"require-dev": {
2324
"ext-curl": "*",
2425
"php-http/adapter-integration-tests": "^0.3",
2526
"guzzlehttp/ringphp": "^1.1",
2627
"php-http/client-common": "^1.0",
2728
"guzzlehttp/psr7": "^1.2",
28-
"php-http/discovery": "^0.7"
29-
},
30-
"suggest": {
31-
"php-http/discovery": "Used for message factory discovery"
29+
"puli/composer-plugin": "1.0.0-beta9"
3230
},
3331
"provide": {
3432
"php-http/client-implementation": "1.0"
@@ -49,7 +47,7 @@
4947
},
5048
"extra": {
5149
"branch-alias": {
52-
"dev-master": "0.5-dev"
50+
"dev-master": "0.6-dev"
5351
}
5452
},
5553
"prefer-stable": true,

src/Client.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ class Client implements HttpClient
3636
*/
3737
public function __construct(ClientInterface $client = null, MessageFactory $messageFactory = null)
3838
{
39-
if (null === $messageFactory and false === class_exists('Http\Discovery\MessageFactoryDiscovery')) {
40-
throw new \LogicException('No message factory provided and no discovery service is present to guess it, maybe you need to install php-http/discovery package?');
41-
}
42-
4339
$this->client = $client ?: new GuzzleClient();
4440
$this->messageFactory = $messageFactory ?: MessageFactoryDiscovery::find();
4541
}

0 commit comments

Comments
 (0)