atymic/twitter

Call to undefined function GuzzleHttp\Psr7\parse_query()

stephen1204paul opened this issue · 14 comments

I tried to use

Route::get('/userTimeline', function() { return Twitter::getUserTimeline(['screen_name' => 'thujohn', 'count' => 20, 'response_format' => 'json']); });

And got the following error

Call to undefined function GuzzleHttp\Psr7\parse_query()

Laravel 8.4 version

Using the 3.1 version of the package

Twitter API 1.1 version

I tried to use, i got stuck in the same place.

What guzzle version are you using? Could you post a stack trace please.

Maybe affected by this major version bump?
https://github.com/guzzle/psr7/blob/master/CHANGELOG.md#removed

Here is my guzzle version.

"guzzlehttp/guzzle": "^7.0.1",

Stack trace : https://flareapp.io/share/B5Zny825#F50

Could you tell me your guzzlehttp/psr7 version (from lock file)?
Thanks!

It is 7.3.0.

It doesn't have that version. I think you're looking at the guzzle version not the psr7 version
https://github.com/guzzle/psr7/releases

Sorry about that.

It is "version": "2.0.0",

Ok, issue looks to be guzzlehttp/oauth-subscriber doesn't support psr7 2.0
Fix in this PR, i'll tag a new version that locks psr7 to 1.x for the time being until and update is merged there.

Great it works now.

Thank you.

Upgrade to 3.1.11 https://github.com/atymic/twitter/releases/tag/3.1.11

Hello, first of all thank you very much for this package which helps us a lot.
I have the problem of parse_query, the problem is that my system has PHP 7.3 and I am migrating to Laravel 7, I see that the requirement to use version 3.1.11 is to have PHP 7.4, is there any solution for those who still use PHP 7.3?
Thank you.

Downgrade your guzzle so you can use the old package version.

@atymic can you release a 3.0.1 version with the only difference from the already released 3.0.0 being this PR (095af83) applied?
"guzzlehttp/psr7": "^1.5"

Many debian10 / php7.3 users would be thankful because 3.0.0 is quite broken... which was the last version of atymic/twitter to support php7.3.
3.1.0 of this package broke compatibility with php7.3.