The first time under Windows installation process YII2, the whole process encountered a lot of problems, after twists and turns, fortunately finally successfully solved.
First, download Yii2 template
Using composer to install the YII2, you first need to download the application template, which is divided into basic template and advanced application template two kinds. Advanced Template Download
Second, GitHub token
Problem:
When installing YII2 applications, such as the use of commands
PHP composer.phar create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced.. /yii2_app
You will be asked to enter tokens at this time.
Workaround:
1, first exit cmd;
2, use the link url:https://github.com/settings/tokens, click Generate New token, Generate a new token (eg: bc018abcdeabcdea2ddef0qq119ca3f1234512345);
3. Next, enter the command in CMD:
PHP Composer.phar config-g github-oauth.github.com bc018abcdeabcdea2ddef0qq119ca3f1234512345
At this point, in the file Auth.json, you can see
{ "Http-basic": {}, "Github-oauth": { "github.com": "bc018abcdeabcdea2ddef0qq119ca3f1234512345< Span style= "color: #FF0000;" ></span> "}}
4, re-execute the command, complete the installation of the YII2 application
PHP composer.phar create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced.. /yii2_app
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Problems and workarounds for installing YII2 using composer under windows