Skip to content

Commit

Permalink
Merge pull request #19 from php-http/implementation-vs-interfaces
Browse files Browse the repository at this point in the history
clarify that you do not need to require the interfaces explicitly when requiring an implementation
  • Loading branch information
sagikazarmark committed Oct 30, 2015
2 parents eac7fa0 + 2c9c082 commit a251d2a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/httplug.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ Note: Until Httplug 1.0 becomes stable, we will focus on the Guzzle6 adapter.

## Usage in a project

When writing an application, you should require a concrete client implementation. The client will in turn depend on `php-http/httplug`.
When writing an application, you need to require a concrete [client implementation](https://packagist.org/providers/php-http/client-implementation). The client will in turn depend on `php-http/httplug`, thus you do not need to duplicate the dependency on `php-http/httplug` in your composer.json file. However, if your code depends on a minimal version of Httplug, specify it to have composer report problems rather than the application failing at some point.

A few things should be taken into consideration before choosing an adapter:

- It is possible that some other dependency already has an HTTP Client requirement like Guzzle 6. It can be confusing to have more than one HTTP Client installed, so always check your other requirements and choose an adapter based on that.
Choose the client based on your personal preferences or dependencies of your project. If your preferred client has no Httplug adapter, submit one.


## Installation in a reusable package
Expand Down

0 comments on commit a251d2a

Please sign in to comment.