KnpLabs/php-github-api — pull request #30 by romainneutron (2013-02-02 14:47:40+00:00)
Title: [WIP] Client / HttpClient decoupling for Guzzle integration

Hello,

this PR decouples the relation between `Client` and `HttpClientInterface`. This will allow to use [Guzzle](guzzlephp.org) as HttpClient instead of Buzz.

The improvement is pretty good : when running multiple request in the same PHP script, Guzzle use CurlMulti as base request handler, using HTTP 1.1 at its best (all request are done inside the same connection) whereas Buzz does not support it (it opens a new connection on every request).

Here are the results of my mini benchmark for 50 requests :

Buzz ~ 1min
Guzzle ~ 15seconds

I open this PR now as it will introduce some BC breaks and lots of changes in the code, comments and feedbacks welcomed !

todo :

[ ] Tests
[ ] BC break documentation
[ ] Update documentation