Introduction to composer structure

藏色散人
Release: 2020-06-02 13:17:06
forward
2691 people have browsed it

The following is an introduction to the composer structure bycomposerusing 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 visitcomposerColumn!

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

Related labels:
source:jianshu.com
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
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!