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,等著升級成功吧

最后編輯于
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

  • Getting Started Use the Current Stable Version (7.1) Buil...
    Leonzai閱讀 2,065評論 0 3
  • Awesome PHP 一個PHP資源列表,內(nèi)容包括:庫、框架、模板、安全、代碼分析、日志、第三方庫、配置工具、W...
    guanguans閱讀 6,126評論 0 47
  • Composer Repositories Composer源 Firegento - Magento模塊Comp...
    零一間閱讀 4,021評論 1 66
  • Spring Cloud為開發(fā)人員提供了快速構建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,554評論 19 139
  • 葛子健GZ閱讀 172評論 0 0

友情鏈接更多精彩內(nèi)容