Adapt for latest http-client#10
Conversation
|
Note after reviewing this PR: it would have been great to use PSR-17 instead of hardcoding against guzzle's PSR-7 implementation. |
|
@nicolas-grekas PR welcome! A deeper review is anyway pending before tagging. |
|
@nicolas-grekas Reviewing the overall API of this library is on my TODO list. Does |
| ->followRedirects(0) | ||
| ->build() | ||
| ); | ||
| self::$psrAdapter ??= new PsrAdapter(new class implements RequestFactoryInterface { |
There was a problem hiding this comment.
this is the line that hardcodes guzzle's PSR-7
| } | ||
| /** @psalm-suppress PossiblyNullReference Initialized in the constructor */ | ||
| $request = self::$psrAdapter->fromPsrRequest($request); | ||
| if (isset($options[RequestOptions::TIMEOUT])) { |
There was a problem hiding this comment.
also this: this is not portable
|
But maybe I misunderstood and this is just about having a guzzle adapter instead of a more generic PSR-foo adapter. |
|
@nicolas-grekas Much of this PR was adding a Guzzle handler class, which maybe should have been done in a separate PR as it wasn't necessary for compatibility with amphp/http-client v5.x. This library provides Is there something in the implementation I'm missing which makes this non-portable? |
No description provided.