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

相关文章
相关标签/搜索