kunalvarma05/dropbox-php-sdk

Call to undefined function GuzzleHttp\Psr7\stream_for()

stccorp opened this issue · 4 comments

composer is not including this file

$vendorDir . '/guzzlehttp/psr7/src/functions_include.php',

whish causes this

Fatal error: Uncaught Error: Call to undefined function GuzzleHttp\Psr7\stream_for() in E:\UserData\oky\htdocs\myproject\vendor\kunalvarma05\dropbox-php-sdk\src\Dropbox\DropboxFile.php:237 Stack trace: #0 E:\UserData\oky\htdocs\myproject\vendor\kunalvarma05\dropbox-php-sdk\src\Dropbox\DropboxFile.php(193): Kunnu\Dropbox\DropboxFile->open() #1 E:\myproject\vendor\kunalvarma05\dropbox-php-sdk\src\Dropbox\DropboxFile.php(324): Kunnu\Dropbox\DropboxFile->getStream() #2 E:\myproject\vendor\kunalvarma05\dropbox-php-sdk\src\Dropbox\Dropbox.php(793): Kunnu\Dropbox\DropboxFile->getSize() #3 E:\myproject\vault\dbox_upload.php(85): Kunnu\Dropbox\Dropbox->upload(Object(Kunnu\Dropbox\DropboxFile), '/Clients/333/2021...') #4 {main} thrown in E:\myproject\vendor\kunalvarma05\dropbox-php-sdk\src\Dropbox\DropboxFile.php on line 23

someone suggested adding this to composer "guzzlehttp/psr7": and it worked
I think someone needs to modify the composer.json of this project

It's not a perm solution, but I ran composer require guzzlehttp/guzzle:~7.2.0 -w and the problem went away for now. has to do with the newer version.

For me, this (temporary?) solution worked:

https://github.com/kunalvarma05/dropbox-php-sdk/pull/195/files

it makes dropbox-php-sdk compatible with the most recent GuzzleHttp package.

PR #195 is waiting for review, merge, release.