After installing the YII2, it appears as an error prompt:
Here's how to fix it:
Open the Installed YII2 project directory (YII2 installation method see the blog of the Sky Star: http://blog.csdn.net/zqtsx/article/details/39344913)
Open the Composer.json file in the YII2 project directory (for example)
Add the following code in the Composer.json file (extra brackets):
The modified Composer.json file is roughly the following (the new code we added to the extra section):
{"Name": "yiisoft/yii2-app-advanced", "description": "Yii 2 Advanced Application Template", "keywords": ["Yii2", "Framework", "Advanced", "Application Template"], "homepage": "http://www.yiiframework.com/", "type": "Project", "License": "Bsd-3-clause", "support": {"Issues": "Https://github.com/yiisoft/yii2/issues?state=open", " Forum ":" http://www.yiiframework.com/forum/"," wiki ":" http://www.yiiframework.com/wiki/"," IRC ":" Irc://irc . Freenode.net/yii "," source ":" Https://github.com/yiisoft/yii2 "}," minimum-stability ":" Dev "," Require ": {"PHP": ">=5.4.0", "Yiisoft/yii2": "*", "yiisoft/yii2-bootstrap": "*", "yiisoft/yii2-swift Mailer ":" * "}," Require-dev ": {" yiisoft/yii2-codeception ":" * "," yiisoft/yii2-debug ":" * "," Y Iisoft/yii2-gii ":" * "," Yiisoft/yii2-faker ":" * "}," config ": {" process-timeout ": 1800}," Extr A ": {" Asset-instAller-paths ": {" npm-asset-library ":" VENDOR/NPM "," bower-asset-library ":" Vendor/bower "," Npm-se Archable ": false," bower-searchable ": false}}}
Then open the command line to switch to YII2 's project directory (non-frame directory):
Execute the following command in turn:
composer global require "fxp/composer-asset-plugin:1.0.* @dev "
composer Update (if not the second step, please execute " composer update--dev--try-run "command, General composer update )
Appear as shown below please be patient and wait for the download of the update file:
By the end of this update,
Open the browser again to enter the project address http://127.0.0.2/frontend/web/to detect if the project is back to normal:
YII2 errors encountered in installation calling unknown Method:yii\web\urlmanager::addrules ()