-
Notifications
You must be signed in to change notification settings - Fork 46
Support Guzzle 7+ #175
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
Support Guzzle 7+ #175
Conversation
PHPUnit tests seem to be failing. I suspect this to be an issue with the tests, rather than the code! |
Why not improve the condition to make sure the correct version of Guzzle is used? |
…inimum version to ^2.0 (GrahamCampbell) This PR was merged into the 2.15.x-dev branch. Discussion ---------- `php-http/client-implementation` is deprecated and Guzzle 7 doesn't implement it, so this will be a blocker for anyone wanting to upgrade from Guzzle 6 to 7 and use this package at the same time. --- Related: GitLabPHP/Client#511, BitbucketPHP/Client#39, php-http/discovery#175. Commits ------- ec31be1 Switch to PSR18 client impl
Ready for re-review now. I've also expanded the "install" tests, so we have some proof that we can detect Guzzle 6 and 7 as PSR-18 clients, and that this won't break in the future. |
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.
thanks, yes this is much clearer imho!
and good that you added the tests so we can see whether it actually works 👍
// Guzzle 6 does not implement the PSR-18 client interface, but Guzzle 7 does. | ||
foreach (self::$classes[Psr18Client::class] ?? [] as $c) { | ||
if (GuzzleHttp::class === $c['class']) { | ||
if (defined('GuzzleHttp\ClientInterface::MAJOR_VERSION')) { |
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.
I dont think we need this.
This logic should be on the condition
Fixed in #177 |
What's in this PR?
Adds support for Guzzle 7 and higher.
Checklist
To Do