zishang520 / Aliyun-oss-storage

AliCloud OSS Laravel storage Filesystem adapter, building the best OSS Storage extension for Laravel. [Original stopped updating, I fork and modify]
https://github.com/zishang520/Aliyun-oss-storage
MIT License
14 stars 1 forks source link

引用包,报这个错误,请问这个咋解决 #2

Closed AniyoVc closed 2 years ago

AniyoVc commented 2 years ago

Illuminate\Filesystem\FilesystemAdapter::__construct(): Argument #1 ($driver) must be of type League\Flysystem\FilesystemOperator, League\Flysystem\Filesystem given, called in C:\phpstudy_pro\WWW\newEdu\vendor\luoyy\ali-oss-storage\src\AliOssServiceProvider.php on line 54

zishang520 commented 2 years ago

@AniyoVc 您好,请提供一下你的laravel版本和安装的luoyy/ali-oss-storage版本

AniyoVc commented 2 years ago

环境是php8.1.3,Laravel Framework 9.3.1,luoyy/ali-oss-storage v3.0.0,因为升级laravel9之后,league/flysystem要求3.0,league/flysystem升级3.0相比1版本少了src/Adapter文件夹、AdapterInterface.php文件、ReadInterface.php文件,您的luoyy/ali-oss-storage/src/AliossAdapter.php文件里面有use了AbstractAdapter和AdapterInterface,所以我把这几个文件从1复制到3了,再运行之后就出现上面说的错误了

zishang520 commented 2 years ago

环境是php8.1.3,Laravel Framework 9.3.1,luoyy/ali-oss-storage v3.0.0,因为升级laravel9之后,league/flysystem要求3.0,league/flysystem升级3.0相比1版本少了src/Adapter文件夹、AdapterInterface.php文件、ReadInterface.php文件,您的luoyy/ali-oss-storage/src/AliossAdapter.php文件里面有use了AbstractAdapter和AdapterInterface,所以我把这几个文件从1复制到3了,再运行之后就出现上面说的错误了

你的代码可能并非最新版本,请更新至tag v3.0.3,该问题将关闭。