yii2的老版本会有在PHP7运行的错误提示

Cannot use yii\base\Object as Object because ‘Object’ is a special class name

use yii\base\Object;
这里的Object 已经是PHP7的保留关键字,可以升级yii解决这个问题
执行
composer update
解决问题
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Updating yiisoft/yii2 (2.0.15.1 => 2.0.42.1): Downloading (100%)
Package codeception/base is abandoned, you should avoid using it. No replacement was suggested.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files
1 package you are using is looking for funding.
Use the `composer fund` command to find out more! Seems you have upgraded Yii Framework from version 2.0.15.1 to 2.0.42.1. Please check the upgrade notes for possible incompatible changes
and adjust your application code accordingly. The relevant notes for your upgrade are too long to be displayed here. You can find the upgrade notes for all versions online at:
https://github.com/yiisoft/yii2/blob/2.0.42.1/framework/UPGRADE.md

YIi2 Object 报错问题的更多相关文章

  1. yii2 HeadersAlreadySentException 报错

    An Error occurred while handling another error:exception 'yii\web\HeadersAlreadySentException' with ...

  2. yii2 HeadersAlreadySentException 报错 解决方案

    报错如下: An Error occurred while handling another error: exception  Stack trace: # /xxxx/xxxx/vendor/yi ...

  3. spring使用jackson返回object报错:Handler execution resulted in exception: Could not find acceptable representation

    问题:在springmvc中添加Jackson jar包返回Object类型,处理器方法的produces属性不写,默认根据类型,但如果指定了(错误原因)produces = "text/h ...

  4. php7.2版本+yii2会报错

    FastCGI sent in stderr: "PHP message: PHP Fatal error:  Cannot use 'Object' as class name as it ...

  5. MacTex XeLaTex xdvipdfmx:fatal: pdf_ref_obj(): passed invalid object. 报错的解决方法

    在使用MacTex配合TexStudio编译beamer的时候,爆出如下错误, xdvipdfmx:fatal: pdf_ref_obj(): passed invalid object. 结果尝试其 ...

  6. yii2.0 报错Cookievalidationkey Must Be Configured With A Secret Key

    'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) ...

  7. Yii2 登录报错

    当用数据库登录系统报如下错误时 PHP Recoverable Error – yii\base\ErrorException Argument 1 passed to yii\web\User::l ...

  8. yii2自定义报错页面

    在Yii2版本的advanced高级模板环境中:设置404自定义页面的方法 1.config/main.php文件 'errorHandler' => [ 'errorAction' => ...

  9. Attempt to insert non-property list object 报错原因

    NSUserDefault 支持的存储类型有:NSString. NSNumber.NSDate. NSArray.NSDictionary.BOOL.NSInteger.NSFloat等系统定义的数 ...

  10. iOS 报错汇总

    1. Unknown type name 'class'; did you mean 'Class' 问题解决方法 objectice-c 工程中的类(比如 类 A)使用 C++ 文件时  A.m 文 ...

随机推荐

  1. Node.js 使用

    创建 Node 项目 npm init -y # 初始化 Node 项目 package.json 文件 这个文件记录了项目的相关信息. { "name": "hello ...

  2. Ubuntu 设置 FTP 服务

    安装 VSFTP 服务 sudo apt install vsftpd 检查配置文件 sudo vim /etc/vsftpd.conf 确保以下配置项正确: #禁止匿名访问 anonymous_en ...

  3. 为什么C++ 单例局部static初始化是线程安全的?

    为什么C++ 单例局部static初始化是线程安全的? const bg::AppSettings& bg::AppSettings::GetInstance() { static AppSe ...

  4. 开源大模型占GPU显存计算方法

    运行大模型GPU占用计算公式: \(M=\frac{(P * 4B)}{32 / Q} * 1/2\) M : 以GB标识的GPU内存 P : 模型中的参数数量,例如一个7B模型有70亿参数 4B : ...

  5. 小程序云开发 Collection.watch 监听器构建和销毁

    小程序云开发 Collection.watch 监听器构建和销毁 构建和销毁代码示例 // release/chatroom/index.js const db = wx.cloud.database ...

  6. JavaScript – 理解 Function, Object, Prototype, This, Class, Mixins

    前言 JavaScript (简称 JS) 有几个概念 Object, Prototype, This, Function, Class 是比较难理解的 (相对其它语言 C# / Java 而已),这 ...

  7. 学习问题记录:RocketMQ集成到SpringBoot后,消费者无法自动进行消息消费。

    情况说明 在SpringBoot中集成了RocketMQ,实践过程中,通过RocketMQ DashBoard观察,生产者可以正常将进行消息提交:通过日志及DashBoard观察,消费者成功在Rock ...

  8. SSD-KD:天翼云&清华出品,最新无原始数据的蒸馏研究 | CVPR'24

    无数据知识蒸馏能够利用大型教师网络所学到的知识,来增强较小型学生网络的训练,而无需访问原始训练数据,从而避免在实际应用中的隐私.安全和专有风险.在这方面的研究中,现有的方法通常遵循一种反演蒸馏的范式, ...

  9. 更新iManager离线镜像包方法

    例如将iserver_gisapplication_mapping_10_1_0.tar镜像更新到iManager仓库中 步骤一.将镜像导入本地镜像仓库 docker load -i iserver_ ...

  10. 5.6 函数y=Asin(ωx+φ)的图像和性质

    \({\color{Red}{欢迎到学科网下载资料学习 }}\) [基础过关系列]2022-2023学年高一数学上学期同步知识点剖析精品讲义(人教A版2019) \({\color{Red}{ 跟贵哥 ...