freyo / flysystem-qcloud-cos-v5

💾 Flysystem Adapter for Tencent Cloud COS V5
https://intl.cloud.tencent.com/product/cos?lang=en
MIT License
156 stars 23 forks source link

undefined function GuzzleHttp\Psr7\stream_for() #46

Closed echoBallon closed 3 years ago

echoBallon commented 3 years ago

[2021-08-17 19:17:31] local.ERROR: Call to undefined function GuzzleHttp\Psr7\stream_for() {"userId":1,"exception":"[object] (Error(code: 0): Call to undefined function GuzzleHttp\Psr7\stream_for() at /var/www/admin/vendor/qcloud/cos-sdk-v5/src/Qcloud/Cos/Client.php:215) [stacktrace]

0 /var/www/admin/vendor/freyo/flysystem-qcloud-cos-v5/src/Adapter.php(202): Qcloud\Cos\Client->upload('jkt-1305459411', 'WX20210817-1854...', '\x89PNG\

\ \x1A\

freyo commented 3 years ago

What's your Laravel/Lumen version? is there any code snippet?

echoBallon commented 3 years ago

the package "guzzlehttp/guzzle" version is 7.3.0, so the bug is active,but i just fixed GuzzleHttp\Psr7\stream_for to \GuzzleHttp\Psr7\Utils::streamFor, it is working ,the file is src/Client.php and src/Qcloud/Cos/Request/BodyLocation.php

freyo commented 3 years ago

the problem is caused by tencentyun/cos-php-sdk-v5