Skip to content

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

Closed
gquemener wants to merge 1 commit into
masterfrom
improvement/http-client-abstraction
Closed

gquemener wants to merge 1 commit into
masterfrom
improvement/http-client-abstraction

Conversation

@gquemener

Copy link
Copy Markdown
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
Copy Markdown
Contributor

👎 for the idea from me.

@docteurklein

Copy link
Copy Markdown
Contributor

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

@GrahamCampbell

Copy link
Copy Markdown
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
Copy Markdown
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

Nyholm commented Mar 6, 2016

Copy link
Copy Markdown
Collaborator

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

cursedcoder commented Jun 2, 2016 •

Copy link
Copy Markdown
Contributor

@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

Nyholm commented Jun 2, 2016

Copy link
Copy Markdown
Collaborator

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

@cursedcoder

Copy link
Copy Markdown
Contributor

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

@Nyholm

Nyholm commented Jun 2, 2016

Copy link
Copy Markdown
Collaborator

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

@Nyholm Nyholm mentioned this pull request Jun 12, 2016
3 tasks done
@Nyholm

Nyholm commented Jul 23, 2016

Copy link
Copy Markdown
Collaborator

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