PHP Composer What is the application scenario is what to read the document is not read
Reply content:
PHP Composer What is the application scenario is what to read the document is not read
Composer is a PHP package management system.
Composer helps us manage PHP dependency packages.
Composer has a central warehouse.
If there is one under composer.json
the project, the content is as follows.
json
{ "require": { "doctrine/doctrine-bundle": "1.3.*@dev", "symfony/symfony": "3.0.*@dev" }}
When you execute both composer install
packages it is installed into your project.
Now a lot of projects support composer, even Sina's SDK is also in use composer management.
You can install PHP packages via composer.
You can also publish a PHP package through him.
For example, you can put
Maven in Java
NPM in Node
The Yum in CentOS
Gems in Ruby
Pip in Python
If you haven't used it yet, start using it quickly.
Composer is a tool that PHP uses to manage dependency (dependency) relationships. You can declare your dependencies on the External tool Library (libraries) in your project, and Composer will help you install these dependent library files. Ruby-like gems and Nodejs NPM.
Composer will solve this problem for you:
-You have a project that relies on a number of libraries.
-Some of these libraries depend on other libraries.
-You declare what you depend on.
-Composer will find out which version of the package needs to be installed and install them (download them to your project).
Note: Composer requires PHP 5.3.2+ to run.
[Composer Chinese web] [http://www.phpcomposer.com/]