Skip to content

[POC] [WIP] Abstract the HTTP Client by using HTTPlug #352

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

Closed
wants to merge 1 commit into from

Conversation

gquemener
Copy link
Contributor

No description provided.

@gquemener gquemener force-pushed the improvement/http-client-abstraction branch from 25504c9 to e0f19f7 Compare January 22, 2016 15:42
@GrahamCampbell
Copy link
Contributor

👎 for the idea from me.

@docteurklein
Copy link
Contributor

@GrahamCampbell Thanks for the feedback :) Can you explain why ?

@GrahamCampbell
Copy link
Contributor

I just feel that guzzle 5/6 does a good job by itself. I see no advantage to adding yet another library on top that might suffer the same upgrading problems to newer libraries that we already do.

@docteurklein
Copy link
Contributor

@GrahamCampbell I understand, I feel the same. The problem we tried to solve with this is the fact we were bound to an old version of guzzle (~3.7 !) and the fact that guzzle tends to break quite often.
With guzzle hidden behind the PSR-7 abstraction, I hope we will have less problems with version transitions (I try to convince myself :) not sure yet another abstraction will help, let's see).

In addition, we will have the guzzle 5+ http cache plugin for free, which is very cool.
Our home made cache is kinda buggy apparently.

@Nyholm
Copy link
Collaborator

Nyholm commented Mar 6, 2016

Httplug is an abstraction for any http client. Using an abstraction means that you decouple yourself from the implementation. This is the D in SOLID, dependency inversion principle.

We should not exclude users using Guzzle5 by require Guzzle6, right? If someone do not want to use Guzzle at all but pure cURL instead should we force them to do otherwise? No. Authors of KnpLabs/php-github-api are experts on the GitHub API and they should not reinvent the wheel with send http messages.

I have made some contributions to the php-http organisation and I am happy to help migrating KnpLabs/php-github-api to Httplug.

@cursedcoder
Copy link
Contributor

cursedcoder commented Jun 2, 2016

@Nyholm you may fork this PR if you are interested.
For now I'm closing it as it's not going to be finished.

@cursedcoder cursedcoder closed this Jun 2, 2016
@Nyholm
Copy link
Collaborator

Nyholm commented Jun 2, 2016

@cursedcoder Are you interested in this feature if I finish the PR?

@cursedcoder
Copy link
Contributor

@Nyholm it would be great if you can finish it.

@Nyholm
Copy link
Collaborator

Nyholm commented Jun 2, 2016

Thank you. I'll add this on my TODO list =)

@Nyholm Nyholm mentioned this pull request Jun 12, 2016
3 tasks
@Nyholm
Copy link
Collaborator

Nyholm commented Jul 23, 2016

I forgot to ping this thread. Here are the new PR: #389

@cursedcoder cursedcoder deleted the improvement/http-client-abstraction branch July 27, 2016 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants