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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM