Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of composer structure

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article shares with you the content of a sample analysis of the structure of composer. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Composer structure

Composer command line tool: this understanding is relatively simple, through the user-defined Composer.json to download the code you need, if you simply use Composer, then you can master some specific commands

Autoloading code loader: through Composer, developers can use it in a variety of ways, the key of which lies in the concept of PHP namespaces and the development of the PSR-4 standard. Composer only developed an automatic code loader based on both of them.

Github: with Github,PHP developers can host open source code on this, and the development of Composer stems from the fact that Github,Composer essentially downloads code on Github locally.

Packagist: the command line tool of Composer is used for users, so how does the command line tool know how many packages can be used by users? this mainly depends on that Packagist,Packagist is the main package information repository of Composer. Package developers host the specific code on Github and submit the package information to Packagist, so that users can use Composer to use .composer to query Packagist based on locally defined composer.json information. Packagist parses according to the Composer.json/Package.json information, and finally corresponds to the github repository. When Composer downloads the code, it depends on the Composer.json on the Github repository. Here, there are three types of composer.json, which have different meanings.

Composer.json: this is the core of Composer and the rule of Composer. Three types of Composer.json are also mentioned above. You must pay attention to the distinction when you use them. I always make a mess when I am a beginner.

Thank you for reading! This is the end of this article on "sample Analysis of composer structure". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report