PHP Fatal error: Cannot use ‘Object‘ as class name as it is reserved

這個錯誤是yii2框架的錯誤了。也就是說不能使用Object做爲類名。

解決方法

一、composer install

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

三、compser update

[root@localhost tmp]# composer updatejquery

Loading composer repositories with package informationgit

Updating dependencies (including require-dev)github

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

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

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

Token (hidden):yii2

瀏覽器打開URL 「https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+localhost.localdomain+2018-02-22+1945」生成token(須要用到github帳號),在命令行輸入便可。

四、composer update

END,等着升級成功吧

相關文章
相關標籤/搜索