In this article I will introduce you to another great project, Composer. Maybe you’ve experienced the pain of working on a PHP application which uses third-party libraries and then trying to keep them and their dependencies up to date. If so, Composer can soothe your pain.
Composer gets you the libraries you want at the versions you need. And if those libraries use other libraries, it can install those and manage them as well. Dependency management can be a hassle-free experience using Composer.
Composer is bundled as an executable Phar archive, so make sure you have the Phar extension enabled in your php.ini file (uncomment extension=phar.so).
I recommend download the latest snapshot of the Composer executable directly from the project’s website.
Alternatively, there is an installer script. that you can run. If you’re comfortable with the issues surrounding such installers, you can cut and paste the following taken from the Composer website:
curl -s https://getcomposer.org/installer | phpTo make Composer globally accessible on your system, move the resulting composer.phar file to a suitable location, like so:
sudo mv composer.phar /usr/local/bin/composer
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/301743/viewspace-749420/，如需转载，请注明出处，否则将追究法律责任。