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. chezmoi 使用

    chezmoi(发音 /ʃeɪ mwa/ (shay-moi)):在多台不同的机器上安全地管理你的 dotfiles. 安装 macOS: brew install chezmoi Ubuntu: s ...

  2. VMware Workstation虚拟机 + 许可证密钥

    VMware Workstation虚拟机 + 许可证密钥 VMware Workstation是什么? VMware简介 VMware 安装 VMware系统要求 VMware 版本下载地址 许可证 ...

  3. WebShell流量特征检测_蚁剑篇

    80后用菜刀,90后用蚁剑,95后用冰蝎和哥斯拉,以phpshell连接为例,本文主要是对这四款经典的webshell管理工具进行流量分析和检测. 什么是一句话木马? 1.定义 顾名思义就是执行恶意指 ...

  4. 忘记 mysql 8.0 root 密码 怎么修改

    本文copy自 Centos7重置Mysql 8.0.1 root 密码 问题产生背景: 安装完 最新版的 mysql8.0.1后忘记了密码,向重置root密码:找了网上好多资料都不尽相同,根据自己的 ...

  5. HTML & CSS – Styling Scrollbar

    前言 Scrollbar 能 styling 的东西不多 (尤其是 IOS 基本上只能 display:none 而已),但有时候我们不得不 styling. 这里记入我自己在项目中修改过的 scro ...

  6. Maven高级——依赖管理

    依赖管理 依赖指向当前项目运行所需的jar包,一个项目可以设置多个依赖 依赖传递 依赖具有传递性 直接依赖:在当前项目中通过依赖配置建立的依赖关系 间接依赖:被依赖的资源如果依赖其他资源.当前项目间接 ...

  7. 【漏洞分析】20240507-SATURN:当闪电贷遇上有缺陷的通缩机制

    背景信息 2024 年 5 月 6 日,SATURN 代币遭受价格操控攻击,损失 15 BNB.攻击发生的原因是由于 SATURN 代币的代币通缩机制设计不合理,使得攻击者可以通过燃烧池子中的 SAT ...

  8. 2024年7月中国数据库排行榜:PolarDB独领云风骚,达梦跨越新巅峰

    在7月发布的中国数据库流行度排行榜中,各大国产数据库厂商在不同领域表现势如破竹,PolarDB以800分刷新记录,并在SIGMOD 2024上获得"最佳论文奖":OceanBase ...

  9. MySQL精品学习资源合集 | 含学习教程笔记、运维技巧、图书推荐

    MySQL凭借开源.免费.低门槛.稳定等优势,成为了当前最流行的关系型数据库之一.从1998年发行第一版以来,通过不断地更新迭代,MySQL被越来越多的公司使用,已然成为当下潮流. 为了帮助大家更好地 ...

  10. 2022年6月中国数据库排行榜:TiDB卷土重来摘桂冠,达梦蛰伏五月夺探花

    排行榜风云又起,各产品墨坛论剑.2022年6月的 中国数据库流行度排行榜 再掀风云,6月排行榜共有231个数据库参与排名,两名新成员的加入,注入了新活力.本月排行榜用一句话可以概括为:TiDB卷土重来 ...