-
Notifications
You must be signed in to change notification settings - Fork 2
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.