首页 > Linux操作系统 > Linux操作系统 > PHP的依赖管理工具-Composer


原创 Linux操作系统 作者:jieforest 时间:2012-11-18 12:09:26 0 删除 编辑
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.

Installing Composer

Composer is bundled as an executable Phar archive, so make sure you have the Phar extension enabled in your php.ini file (uncomment

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 | 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博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录


  • 博文量
  • 访问量