码迷,mamicode.com
首页 > Web开发 > 详细

YII2.0.12兼容PHP7.2版本升级

时间:2019-08-11 17:47:10      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:yii   ati   oba   osi   err   解决   end   not   vendor   

YII2.0.12兼容PHP7.2版本升级

报错信息:

FastCGI sent in stderr: "PHP message: PHP Fatal error:  Cannot use ‘Object‘ as class name as it is reserved in /home/leo/htdocs/oa/vendor/yiisoft/yii2/base/Object.php on line 77

这个错误是yii2框架的错误了。也就是说不能使用Object作为类名。

解决方法

1、composer install

2、composer global require "fxp/composer-asset-plugin:^1.4.1"

3、compser update

[root@localhost tmp]# composer update

Loading composer repositories with package information

Updating dependencies (including require-dev)

Could not fetch https://api.github.com/repos/jquery/jquery-dist, please create a GitHub OAuth token to go over the API rate limit

Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+localhost.localdomain+2018-02-22+1945

to retrieve a token. It will be stored in "/root/.composer/auth.json" for future use by Composer.

Token (hidden):

浏览器打开URL “https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+localhost.localdomain+2018-02-22+1945”生成token(需要用到github账号),在命令行输入即可。

4、composer update

END,等着升级成功吧

YII2.0.12兼容PHP7.2版本升级

标签:yii   ati   oba   osi   err   解决   end   not   vendor   

原文地址:https://www.cnblogs.com/bluealine/p/11335454.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!