Repository navigation
Support Guzzle 7+ - #175
Merged
Merged
Conversation
gmponos
reviewed
Jun 28, 2020
gmponos
approved these changes
Jun 28, 2020
Contributor
Author
|
PHPUnit tests seem to be failing. I suspect this to be an issue with the tests, rather than the code! |
This was referenced Jun 28, 2020
Member
|
Why not improve the condition to make sure the correct version of Guzzle is used? |
acrobat
added a commit
to KnpLabs/php-github-api
that referenced
this pull request
Jun 28, 2020
…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
dbu
reviewed
Jul 1, 2020
dbu
reviewed
Jul 1, 2020
Contributor
Author
|
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. |
dbu
approved these changes
Jul 2, 2020
dbu
left a comment
Contributor
There was a problem hiding this comment.
thanks, yes this is much clearer imho!
and good that you added the tests so we can see whether it actually works 👍
Nyholm
reviewed
Jul 2, 2020
| // 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')) { |
Member
There was a problem hiding this comment.
I dont think we need this.
This logic should be on the condition
Member
|
Fixed in #177 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's in this PR?
Adds support for Guzzle 7 and higher.
Checklist
To Do