Add Guzzle7 Adapter Client Discovery#189
Conversation
|
thanks! can you please also add an integration test for the adapter so we can ensure it keeps working, very similar to Line 67 in 87b580c |
|
oh, and no need to worry about the phpspec 8 failure in the test suite - that is unrelated to what you are doing. |
|
Seems to be passing :) (Used 0.1 though, because there is no 1.x yet) |
|
tagged as 1.12.0 https://github.com/php-http/discovery/releases/tag/1.12.0 |
|
I would actually be 👎 against the creation of that Guzzle 7 adapter. People should be using the PSR interfaces these days, which Guzzle 7 already provides. No need to create a Guzzle 8 adapter, certainly, when Guzzle 8 is released. |
|
@GrahamCampbell The Guzzle 7 adapter implements the async version of HTTPlug, so for those in need of HTTPlug async, this is necessary. For those who already use PSR-18 only, Guzzle 7 will be discovered directly. |
|
another valid use case is using guzzle 7 with older libraries that asks for httplug instead of psr-18. but i agree that new projects that do synchronous requests should use psr-18 and not httplug these days. |
I was rather hoping by not providing compat for that we'd encourage them to upgrade. Many maintainers aren't even aware that they could/should do that. |
|
until there is a psr for async requests (which can't happen before there is a psr for promises), httplug can't be faded out anyways, so i think the cost of not forcing people to adapt is not that high. compared to the cost of people being confused why they can't find a http client when they have guzzle and the adapter installed. if they ask for a psr-18 adapter, they will get guzzle directly and not our adapter, so that is fine. |
Related:
What's in this PR?
Adds support for https://github.com/php-http/guzzle7-adapter
Why?
To provide the HttpClient for Guzzle7
Checklist