Composer Dependency management tools

Source: Internet
Author: User
Composer is a PHP A dependency management tool , 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 This will solve the 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).

Composer requires PHP version 5.3.2 or more,

Before installing composer, you need to make sure that PHP has been added to the system's path environment variable, and that the detection method

Enter Php-v in cmd

If not, please copy the file directory containing the Php.exe to the path.

Composer installation, here only the manual installation process:

1: Go to composer official website to download the latest version of composer

https://getcomposer.org/download/

Download it will be a Composer.phar file, and then copy it to the PHP installation directory (and PHP.exe is the same directory), and the command to execute PHP should be
The same set of PHP, then create a new Composer.bat file here and save the following code to the file

"%~dp0composer.phar" %*
Finally reopen a command-line window and try it out. composer --versionSee if the version number is output correctly.

This method corresponds to a global installation and can be run anywhere with the composer command. For local installation, you need to copy the Composer.phar to the place you want to run and run it through PHP Composer.phar.

Composer official website for all-English, if readers are not accustomed to reading, I recommend two sites:

Http://docs.phpcomposer.com/00-intro.html

http://pkg.phpcomposer.com/




The above describes the composer dependency management tools, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.