ITPub博客

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

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 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:

CODE:

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:

CODE:

sudo mv composer.phar /usr/local/bin/composer

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/301743/viewspace-749420/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-04-23

  • 博文量
    442
  • 访问量
    525345