ThinkPHP: Class ‘think\\facade\\Filesystem‘ not found

简介: ThinkPHP: Class ‘think\\facade\\Filesystem‘ not found

目录

问题描述

新项目报错

ThinkPHP: Class 'think\\facade\\Filesystem' not found

我保证我只改了数据库配置,其他代码都是原样拷贝过去的

查看 composer.lock 文件

{
    "name": "topthink/framework",
    "version": "v6.1.2",
}

找到他的2023年2月10日 发布的更新文档:ThinkPHP6.1.2版本发布——兼容PHP8.2

发现它删除了Filesystem

移除基础类中Filesystem申明属性

感觉和我的报错很相关了

解决方式

1、安装一个低版本的依赖

composer require topthink/framework=6.0.8

2、可以将版本锁定

修改前 composer.json

{
    "require": {
        "topthink/framework": "^6.0.8",
    }
}

修改后 composer.json

{
    "require": {
        "topthink/framework": "6.0.8",
    }
}


相关文章
|
4月前
|
存储
定义存储路径的写法 private static final String STORE_DIR = “E:\\B站视频创作\\前后端项目构建-小功能实现\\代码\\backend\\src\\main
定义存储路径的写法 private static final String STORE_DIR = “E:\\B站视频创作\\前后端项目构建-小功能实现\\代码\\backend\\src\\main
PHP zip ZipArchive 扩展
PHP zip ZipArchive 扩展
112 1
|
JavaScript Java
Argument 2 passed to think\\filesystem\\Driver::putFile() must be an instance of think\\File
Argument 2 passed to think\\filesystem\\Driver::putFile() must be an instance of think\\File
1196 0
|
PHP
PHP: Laravel报错Target class [App\\service\\AuthService] does not exist
PHP: Laravel报错Target class [App\\service\\AuthService] does not exist
138 0
? error: cannot open C:\Users???\AppData\Local\Temp\main.obj.5136.0.jom for write
? error: cannot open C:\Users???\AppData\Local\Temp\main.obj.5136.0.jom for write
423 0
成功解决FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\niu\\AppData\\Local\\Temp\\p
成功解决FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\niu\\AppData\\Local\\Temp\\p
成功解决FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\niu\\AppData\\Local\\Temp\\p
成功解决PermissionError: [WinError 5] 拒绝访问 \lib\\site-packages\\h5py\\_errors.cp38-win_amd64.pyd‘
成功解决PermissionError: [WinError 5] 拒绝访问 \lib\\site-packages\\h5py\\_errors.cp38-win_amd64.pyd‘
|
XML 数据格式
因为CircleImageView导致Binary XML file line #96: Error inflating class <unknown>
因为CircleImageView导致Binary XML file line #96: Error inflating class <unknown>
175 0
成功解决FileNotFoundError: [Errno 2] No such file or directory: 'F:\\Program Files\\Python\\Python36\\li
成功解决FileNotFoundError: [Errno 2] No such file or directory: 'F:\\Program Files\\Python\\Python36\\li
成功解决FileNotFoundError: [Errno 2] No such file or directory: 'F:\\Program Files\\Python\\Python36\\li