Home  >  Article  >  Development Tools  >  Introduction to composer structure

Introduction to composer structure

藏色散人
藏色散人forward
2020-06-02 13:17:062807browse

The following is an introduction to the composer structure by composer using the tutorial column. I hope it will be helpful to friends in need!

Introduction to composer structure

composer structure

Composer command line tool: This understanding is relatively simple, through the user-defined Composer.json Download the code you need. If you just use Composer simply, then you can master some specific commands.

Autoloading code loader: Through Composer, developers can use it in a variety of ways, and the key is Based on PHP's namespace concept and the development of the PSR-4 standard, Composer just developed a code autoloader based on these two

Github: With Github, PHP developers can host open source code on In this regard, the development of Composer originated from Github. Composer essentially downloads the code on Github locally.

Packagist: For users who use the command line tool of Composer, then the command line tool How to know how many packages can be used by users? This mainly relies on Packagist. Packagist is Composer's main package information repository. Package developers host specific codes on Github and submit package information to Packagist. Use this way Composer can use it through Composer. Composer queries Packagist based on the locally defined composer.json information. Packagist parses based on Composer.json/Package.json information, and finally corresponds to the github warehouse. Composer also relies on Github when it finally downloads the code. Composer.json on the warehouse, there are three types of composer.json involved, and their meanings are different.

Composer.json: This is the core of Composer and the rules of Composer. The three types are also mentioned above. There are two types of Composer.json. You must pay attention to distinguish them when using them. I always messed up when I first learned.

For more composer technical articles, please visit composer Column!

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

Statement:
This article is reproduced at:jianshu.com. If there is any infringement, please contact admin@php.cn delete