PHP relies on Administrative tools. For handling packages or libraries.based on a single project project, which is saved in the Vender directory of Project, and will never be installed globally by default. PHP 5.3.2+ is required, git,svn or HG is required to install the resource bundle.
1, download Composer.phar to your project folder, is the project packaging files, there are autoloadgenerator. Classmapgenerator and so on. Https://getcomposer.org/download/can be downloaded directly below manual download, or use the command
curl -sS https://getcomposer.org/installer | php
2, execute PHP composer.phar, can get composer version number information, and some command 3, create Composer.json file, declare the dependencies inside. And npm a bit like 4, use the command composer.install, download the dependency package, typically under the Vender folder, and generate the Composer.lock file, which is used to lock the dependent package version number. When the Composer.lock file is present, when the composer Install command is run, composer is updated to install according to the package designation version number in Composer.lock, assuming that the composer update is running , the package version number is updated and the Composer.lock file is updated.
5, composer has its own active loading mechanism, the use of direct introductionrequire' vendor/autoload.php ';6, http://docs.phpcomposer.com/00-intro.html Chinese document https://getcomposer.org/official website 7, the package download generally needs FQ. Using a VPN or http://my.oschina.net/u/248080/blog/378825 recommends buying a VPN, not expensive.
PHP Composer Tool high-speed tutorial, super simple