Home > Development Tools > composer > How to use composer

How to use composer

藏色散人
Release: 2019-08-03 11:17:56
Original
5435 people have browsed it

Composer is a dependency management tool for PHP. It allows you to declare the code libraries your project depends on and install them in your project for you based on the declared dependencies. Composer is not a package management tool, because the real packages are located on packagist and github. Composer is equivalent to an intermediate medium to help you install the packages you declare, so composer is a dependency management tool.

How to use composer

How to use composer?

Recommended: [composer tutorial]

How to use composer:

1. First create composer. json file

2. Then execute composer install to install the dependency package

3. Introduce dependencies into the php file, require vendor/autoload.php

Note:

You don’t need to create a composer.json file here. You can install dependent packages directly through composer require supplier/package name. This is also recommended, as it is more convenient.

The above is the detailed content of How to use 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