What is the Application Scenario of php Composer? I have read the documentation, but I have not understood the php Composer. I have not read the documentation.
Reply content:
Php Composer does not understand the Application Scenario or the document.
Composer is a php package management system.
Composer helps us manage php dependency packages.
Composer has a central repository
Assume that the project hascomposer.json
, The content is as follows.
json
{ "require": { "doctrine/doctrine-bundle": "1.3.*@dev", "symfony/symfony": "3.0.*@dev" }}
When you executecomposer install
These two software packages are installed in your project.
Currently, many projects support composer, and even Sina sdks use composer for management.
You can install the php package through composer.
You can also use it to publish the php software package.
For example
Maven in java
Npm in node
Yum in centos
Gem in ruby
Pip in python
If you haven't used it yet, start using it now.
Composer is a tool used by PHP to manage dependencies. You can declare the dependent external library (libraries) in your project. Composer will help you install these dependent library files. Similar to Ruby's Gem and NodeJS's NPM.
Composer will solve the problem for you as follows:
-You have a project dependent on several databases.
-Some libraries depend on other libraries.
-You declare what you are dependent on.
-Composer will find out which packages need to be installed and install them (download them to your project ).
Note: Composer requires PHP 5.3.2 + to run.
[Composer] [http://www.phpcomposer.com/]