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. 啥是Session?

    什么是 Session 会话? 1.Session 就一个接口(HttpSession). 2.Session 就是会话.它是用来维护一个客户端和服务器之间关联的一种技术. 3.每个客户端都有自己的一 ...

  2. C语言输出格式工整的日历——2乘6样式(详见本文)

    本篇博客有更新!!!更新后效果图如下: 文章末尾的完整代码如不能在Dev-C++上完好运行,出现如下问题: E:\Dev-Cpp\源代码\万年历.c [Error] 'for' loop initia ...

  3. C++ weak_ptr除了解决循环引用还能做什么?

    C++: weak_ptr到底有什么用? 很多人对std::weak_ptr的认识只是不增加std::shared_ptr的引用计数,可以用来解决std::shared_ptr可能造成的循环引用问题. ...

  4. python 浅拷贝与深拷贝

    赋值引用 >>> a= {1:[1,2]}>>> b = a>>> b[2]=3>>> b {1: [1, 2], 2: 3} ...

  5. Linux (Debian) 安装MySQL 后如何获取登录密码

    树莓派安装MySQL后获取登录密码 树莓派基于Debian系统. 成功安装MySQL后 su root vim /etc/mysql/debian.cnf 其中 user 和 password 就是你 ...

  6. ASP.NET Core – HttpClient

    前言 以前写过的文章 Asp.net core 学习笔记 ( HttpClient ). 其实 HttpClient 内容是挺多的, 但是我自己用到的很少. 所以这篇记入一下自己用到的就好了. 参考 ...

  7. Asp.net Core 学习笔记 Azure Storage

    更新: 2021-07-22 使用 Azure storage 以后, 还要解决一个 url 的问题. 文件自然是通过我们的 domain 来访问才合理丫. 这个是 azure 的 url : htt ...

  8. Figma 学习笔记 – Frame

    Frame = <div> Frame 就类似 HTML 中的 div, 它和形状 rectangle 特性上蛮相识的, 但是使用场景其实差很多, 所以不要搞错哦. (除了图片很少会用到 ...

  9. 这些年没来得及学习的一些 HTML5 标签

    认识并学习下还没来得及学习的一些 HTML5 标签 <ruby> 标签 HTML <ruby> 元素被用来展示东亚文字注音或字符注释. 比如: <ruby>兄弟&l ...

  10. vue3 3.3.4

    https://cn.vuejs.org/guide/introduction.html#what-is-vue 简介 import { createApp } from 'vue' createAp ...