Home  >  Article  >  Development Tools  >  Composer practical tutorial

Composer practical tutorial

藏色散人
藏色散人forward
2019-09-19 13:44:452214browse

Composer practical tutorial

1. Perceptual understandingComposer

One sentence: PHP version App Store

Composer practical tutorial

China mirror list: https://pkg.phpcomposer.com/

2. Composer global installation and Git

Composer global installation: https://docs.phpcomposer.com/00-intro.html#Globally

Git graphic tutorial: https://segmentfault.com/a/1190000008617626

3. Create the composer.json file to build a Packagist installation package

Composer practical tutorial

Composer practical tutorial

Composer practical tutorial

Packagist will automatically grab the composer.json file in GitHub.

Add the project to composer.

Composer practical tutorial

4. Download the items in the installation package Packagist

Composer practical tutorial

##5. The GitHub hook automatically updates the installation package in Packagist

Composer practical tutorial

There is no need to click this update to synchronize the code on GitHub to Packagist.

Composer practical tutorial

6. Define Composer to implement automatic loading autoload

Composer practical tutorial

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

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