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

Commit

Permalink
Merge pull request #20 from php-http/discovery_upgrade
Browse files Browse the repository at this point in the history
Update discovery usage
  • Loading branch information
sagikazarmark committed Feb 23, 2016
2 parents 3240547 + 5272fe4 commit 4edc424
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log


## 0.5.0 - 2016-02-23

### Added

- Hard discovery dependency with Puli composer plugin suggested


## 0.4.0 - 2016-01-27

### Changed
Expand Down
10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@
"require": {
"php": ">=5.4",
"php-http/httplug": "^1.0",
"guzzlehttp/guzzle": "^5.1"
"guzzlehttp/guzzle": "^5.1",
"php-http/discovery": "^0.8"
},
"require-dev": {
"ext-curl": "*",
"php-http/adapter-integration-tests": "^0.3",
"guzzlehttp/ringphp": "^1.1",
"php-http/client-common": "^1.0",
"guzzlehttp/psr7": "^1.2",
"php-http/discovery": "^0.7"
},
"suggest": {
"php-http/discovery": "Used for message factory discovery"
"puli/composer-plugin": "1.0.0-beta9"
},
"provide": {
"php-http/client-implementation": "1.0"
Expand All @@ -49,7 +47,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "0.5-dev"
"dev-master": "0.6-dev"
}
},
"prefer-stable": true,
Expand Down
4 changes: 0 additions & 4 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class Client implements HttpClient
*/
public function __construct(ClientInterface $client = null, MessageFactory $messageFactory = null)
{
if (null === $messageFactory and false === class_exists('Http\Discovery\MessageFactoryDiscovery')) {
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?');
}

$this->client = $client ?: new GuzzleClient();
$this->messageFactory = $messageFactory ?: MessageFactoryDiscovery::find();
}
Expand Down

0 comments on commit 4edc424

Please sign in to comment.