what is composer

藏色散人
Release: 2019-08-02 16:46:26
Original
2955 people have browsed it

what is composer

What is composer?

Simply put, Composer is a new installation 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 the development packages that your project 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
Copy after login

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.

For more related composer usage tutorial articles, please visit the composer tutorial column!

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!