Composer is a tool that PHP uses to manage dependency (dependency) relationships. You can declare your dependencies on the External tool Library (libraries) in your project, and Composer will help you install these dependent library files
Composer Chinese web
http://www.phpcomposer.com/
Installation path
Installation path of composer https://getcomposer.org/download/
Install under Windows
After you install composer successfully in Windows, the Composer.phar file is generated under the C:\ProgramData\ComposerSetup\bin path.
The Could not input open File:composer.phar that appears in use should check the installation directory and environment variable configuration for composer.
Actual operation
Before you execute the composer command, you can copy the Composer.phar file to the project engineering file before executing
To install the yii2-admin extension as an example https://github.com/mdmsoft/yii2-admin, we just need to copy the Composer.phar to the YII2 project directory, then the command line to switch to this directory and execute
php composer.phar require mdmsoft/yii2-admin "~1.0"
The complete flag is vendor Add Mdmsoft source folder, that is, yii2-admin source file.
The following are the related nodes of Composer.json
"Require": { "php": ">=5.4.0", "Yiisoft/yii2": "*", "Yiisoft/yii2-bootstrap": "*", " Yiisoft/yii2-swiftmailer ":" * ", " Guzzlehttp/guzzle ":" ~5.0 ", " mdmsoft/yii2-admin ":" ~1.0 " },
Yii2 using composer