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",
    }
}


相关文章
|
6天前
|
监控 C#
55.c#:file类
55.c#:file类
76 1
|
PHP
PHP: Laravel报错Target class [App\\service\\AuthService] does not exist
PHP: Laravel报错Target class [App\\service\\AuthService] does not exist
102 0
|
Java
IDEA 启动服务报错:Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun 解决方案
IDEA 启动服务报错:Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun 解决方案
1547 1
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
1104 0
|
JavaScript Java
|
网络协议 Java API
Java-NIO.2中Path、 Paths、Files类的使用
Java NIO (New IO,Non-Blocking IO)是从Java 1.4版本开始引入的一套新的IO API,可以替代标准的Java IO API。NIO与原来的IO有同样的作用和目的,但是使用的方式完全不同,NIO支持面向缓冲区的(IO是面向流的)、基于通道的IO操作。NIO将以更加高效的方式进行文件的读写操作。
108 0
File类的了解和使用
File类的了解和使用
127 0
File类的了解和使用
成功解决PermissionError: [WinError 5] 拒绝访问 \lib\\site-packages\\h5py\\_errors.cp38-win_amd64.pyd‘
成功解决PermissionError: [WinError 5] 拒绝访问 \lib\\site-packages\\h5py\\_errors.cp38-win_amd64.pyd‘
成功解决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
|
XML 数据格式
因为CircleImageView导致Binary XML file line #96: Error inflating class <unknown>
因为CircleImageView导致Binary XML file line #96: Error inflating class <unknown>
160 0