Composer a dependency management tool for PHP

Source: Internet
Author: User

Composer is a dependency management tool for PHP. It allows you to declare the code base on which the project depends, and it installs them for you in your project.

composer is not a package manager. Yes, it involves "packages" and "libraries", but it is managed on a per-project basis, in a directory of your project (e.g.  vendor ) for installation. By default it will not install anything globally. Therefore, this is only a dependency management.

Composer will solve this problem for you:

A) You have a project that relies on a number of libraries.

b) Some of these libraries depend on other libraries.

c) You declare what you depend on.

d) Composer will find out which version of the package needs to be installed and install them (download them to your project).


php -r  "copy (' Https://getcomposer.org/installer ',  ') Composer-setup.php '); " php -r  "if  (Hash_file (' SHA384 ',  ' composer-setup.php ')  ===  ' 544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061 ')  {  echo  ' installer verified '; } else { echo  ' installer corrupt ';  unlink (' composer-setup.php '); } echo php_eol; " php composer-setup.phpphp -r  "unlink (' composer-setup.php ');" 

One more Composer.phar after the installation is complete

And then execute

./composer.phar Update

After the update, there will be one more vendor folder


Composer a dependency management tool for PHP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.