Closed timwiel closed 2 years ago
Having the same error. Downgrading fixed it. Yeah please fix this. Thanks.
Yep, fixed it for me as well.
I'm using PHPStorm - I added the following line to my composer.json file and hit "Update"
"require": { ... "guzzlehttp/psr7": "^1.8", ... }
I've included this in the 2.7.0
release. I was unable to recreate it initially, but I tested against a fresh install and it worked well for me. Please let me know otherwise, and if this release remedies the need to manually downgrade psr7
This seems wrong. Wouldn’t a better fix be to actually do what it says? Use Query::build instead.
This is compatible with v1.x too, so it won’t matter what version people actually use.
Yeah - Re-opening to evaluate refactoring to use newest release of psr7 Query::build
for a future release.
Hello @SerKnight, just in case; I created a PR for this issue #249 This is my first time contributing (publicly) so please correct me if I had invalidated any rules.
Not sure if this is the right place for it, or if we should make a new issue, but we're using an outdated version of guzzlehttp/psr7. Currently:
"guzzlehttp/psr7": "^1.8",
Something like...
"guzzlehttp/psr7": "^1.8|^2.0",
would be better. Currently this is preventing update of this package (which is used by a number of other packages in my application).
Please upgrade and refactor with Query::build. Unable to use with other packages.
It would be great to see some action on this issue. In my case, I cannot downgrade Guzzle without refactoring more than half my application, which means I am unable to use this library.
Hey all. This is going to be included in an upcoming release soon, next week hopefully.
Apologies for the delay on this. There were significant changes for the team last year and we're looking to ramp up velocity this year now that we're back to full headcount.
Thanks for the update @RettBehrens - looking forward to it as it's also causing some issues in our application
Resolved in the latest release. Made the necessary changes upstream in our code generator repo.
SDK you're using (please complete the following information):
Describe the bug Installing fresh composer install of xeroapi/xero-php-oauth2 leads to php error as follows:
Uncaught Error: Call to undefined function GuzzleHttp\Psr7\build_query()
This is because a fresh and default install using composer drags down guzzlehttp/psr7 version 2.0 which has removed the
psr7/src/functions.php
file as per the comment in the 1.8.2 version of that file@deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead.
It can be fixed by forcing a composer downgrade of the guzzlehttp/psr7 to version 1.8 using the composer command:
composer require guzzlehttp/psr7 "^1.8"
Expected behavior Composer install of xeroapi/xero-php-oauth2 should just work without the need to downgrade dependancies manually