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. 斐讯 N1 刷机记录

    Prerequisites USB 公对公线 Windows 操纵系统 AMLogic USB Burning Tool,安装后名字为 Aml_Burn_Tool. 降级 打开终端,输入 hdwwiz ...

  2. 【Python】之pip安装报错问题:WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))

    我想安装python第三方库,但是始终报安装失败 经查询得知,需要国内源,有如下地址: 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https: ...

  3. 【Mac + Python + Selenium】之获取验证码图片code并进行登录

    自己新总结了一篇文章,对代码进行了优化,另外附加了静态图片提取文字方法,两篇文章可以结合着看:<[Python]Selenium自动化测试之动态识别验证码图片方法(附静态图片文字获取)> ...

  4. Cannot add task 'wrapper' as a task with that name already exists.

    写gradle项目的运行模板脚本 直接执行gradle clean build会报错 将原本的: task wrapper(type: Wrapper) { gradleVersion = '4.10 ...

  5. Asp.net core 学习笔记之异常处理

    自己写代码自己维护, 你爱怎样写都可以, 确保一致性就可以了. 不要自己写,自己看不懂 /.\ 但是如果有一天你要别人也看得懂...那就不单单是一致性的问题了,最好是用大众的 style. refer ...

  6. Figma 学习笔记 – Constraints 约束

    用途 Constraints 用于 responsive design, 子元素和父元素建立约束关系后, 当父元素 dimension 变换的时候, 子元素会做出相应的变化 (移动位置或 resize ...

  7. GPT最佳实践:五分钟打造你自己的GPT

    前几天OpenAI的My GPTs栏目还是灰色的,就在今天已经开放使用了.有幸第一时间体验了一把生成自己的GPT,效果着实惊艳!!!我打造的GPT模型我会放到文章末尾,大家感兴趣也可以自己体验一下. ...

  8. JavaScript —— 简介-引入方式

    什么是JavaScript?    JavaScript的引入方式:      

  9. QT6跨平台开发

    QT6跨平台开发 使用AI技术辅助生成 QT界面美化视频课程 QT性能优化视频课程 QT原理与源码分析视频课程 QT QML C++扩展开发视频课程 免费QT视频课程 您可以看免费1000+个QT技术 ...

  10. Flutter Forward 活动正式发布

    2023 年 1 月 25 日,Flutter 团队将在肯尼亚首都内罗毕举办 Flutter Forward 大会,并同时开启线上直播,敬请期待! 活动将于北京时间 1 月 25 日 22:30 开始 ...