Skip to content
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

Guzzle v7 interface issue #53

Closed
kschouw opened this issue Sep 23, 2020 · 4 comments
Closed

Guzzle v7 interface issue #53

kschouw opened this issue Sep 23, 2020 · 4 comments

Comments

@kschouw
Copy link

kschouw commented Sep 23, 2020

Hi guys,

With the latest commit to the composer file to use Guzzle 6|7 it completely breaks the library unless version 6 is explicitly required before hand. The issue seems to be related to /Http/Client.php not conforming to the Psr\Http\Message\ResponseInterface in the latest version of Guzzle.

Here is the error when trying to upload something to B2:

PHP Fatal error:  Declaration of BackblazeB2\Http\Client::request($method, $uri = NULL, array $options = Array, $asJson = true) must be compatible with GuzzleHttp\Client::request(string $method, $uri = '', array $options = Array): Psr\Http\Message\ResponseInterface in /gliterd/backblaze-b2/src/Http/Client.php on line 43

Thanks for the help.

@mhetreramesh
Copy link
Member

Hi, Thanks for reporting this.

@matthewhall-ca since you sent the PR for this change which was needed for laravel 8. Can you verify if you also has the same issue or works fine?

@kschouw
Copy link
Author

kschouw commented Sep 23, 2020

Thanks @mhetreramesh

I did a little digging and the Guzzle 7 request method on the interface now explicitly requires the Psr\Http\Message\ResponseInterface to be returned however a string is returned as the response in /gliterd/backblaze-b2/src/Http/Client.php.

@MatthewHallCom
Copy link
Contributor

Ah can confirm! I had another package that was locking my laravel to Guzzle 6 so I missed this in my testing! I'll take a look at a new MR that fixes this

@mhetreramesh
Copy link
Member

I've made a new version with the latest MR. Thanks for @matthewhall-ca for the update.

@kschouw you can try with the latest version now, it should be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants