Home  >  Article  >  Development Tools  >  What software is composer?

What software is composer?

藏色散人
藏色散人Original
2019-08-03 10:00:455185browse

What software is composer?

Recommended: [composer tutorial]

What software is composer?

Simply put, Composer is a new package management tool serving the PHP ecosystem. It actually consists of two parts: Composer and Packagist. Below we will briefly talk about their respective uses.

Composer

Composer is a command line tool created by Jordi Boggiano and Nils Aderman. Its mission is to help you automatically install projects. The development packages it depends on. Many concepts in Composer are borrowed from npm and Bundler. If you know something about these two tools, you will find them in composer. Composer includes a dependency parser to handle complex dependencies between development packages; in addition, it also includes downloaders, installers and other interesting things.

As a user, all you have to do is declare the development packages that the current project depends on in the composer.json file, and then run composer.phar install. The composer.json file defines the development packages and composer configuration information that the current project depends on. The following is a small example:

{
    "require": {
        "monolog/monolog": "1.2.*"
    }
}

Packagist

Packagist is Composer's default development package repository. You can submit your installation package to packagist. In the future, if you create a new tag or update the code in your VCS (source code management software, such as Github) warehouse, packagist will automatically build a new development package. This is how packagist currently works, in the future packagist will allow direct uploading of development packages.

The above is the detailed content of What software is composer?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Introduction to ComposerNext article:Introduction to Composer