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

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,等着升级成功吧

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Getting Started Use the Current Stable Version (7.1) Buil...
    Leonzai阅读 1,970评论 0 3
  • Awesome PHP 一个PHP资源列表,内容包括:库、框架、模板、安全、代码分析、日志、第三方库、配置工具、W...
    guanguans阅读 5,816评论 0 47
  • Composer Repositories Composer源 Firegento - Magento模块Comp...
    零一间阅读 3,967评论 1 66
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,860评论 18 139
  • 葛子健GZ阅读 153评论 0 0