-
-
Notifications
You must be signed in to change notification settings - Fork 599
[WIP] Client / HttpClient decoupling for Guzzle integration #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
$this->httpClient->authenticate($authMethod, $tokenOrLogin, $password); | ||
} | ||
|
||
public function executeCommand($method, $command, $parameters, $headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better to rename to executeRequest
I'd love to see this finished off. ;) |
Hey guys, we are planning to use this pull request (in a very big project, performance essential) rather than Buzz (which seemed to be dead), does anyone have an idea if this will be finished soon? It would be a great step forward. Will this eventually replace Buzz or does this serve as an alternative? |
Hello @TitanKing ! I just have to finish to write some tests.... Unfortunately, I got a lot of work at the moment. I'll ping you as soon as it's ready |
Bleh... who cares about tests :D, do you think it is safe for us to just continue using it? Will this eventually replace Buzz as the default? |
You should use the Buzz client for the moment and wait for a stable release. If you really want to test this implementation, feel free to use my repo in your project |
Thanks man will do, your a star. |
@romainneutron how is going? have a chance to see that you finish it? |
Well, I got lot of work on other projects. I've spent some time here, but this library is quite coupled with Buzz and I've not finished to port everything. |
closing because of #80 |
Hello,
this PR decouples the relation between
Client
andHttpClientInterface
. This will allow to use Guzzle 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 requests 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 :