HOME

TheInfoList



OR:

Composer is an application-level dependency manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. It was developed by Nils Adermann and Jordi Boggiano, who continue to manage the project. They began development in April 2011 and first released it on March 1, 2012. " npm" and Ruby's " bundler". The project's dependency solving algorithm started out as a PHP-based port of openSUSE's libzypp satsolver. Composer runs from the command line and installs dependencies (e.g. libraries) for an application. It also allows users to install PHP applications that are available on "Packagist" which is its main repository containing available packages. It also provides
autoload In computer programming, autoloading is the capability of loading and linking portions of a program from mass storage automatically when needed, so that the programmer is not required to define or include those portions of the program explicitly ...
capabilities for libraries that specify autoload information to ease usage of third-party code.


Syntax


Commands

Composer offers several parameters including : * require: add the library in parameter to the file composer.json, and install it. * install: install all libraries from composer.json. It's the command to use to download all PHP repository dependencies. * update: update all libraries from composer.json, according to the allowed versions mentioned into it. * remove: uninstall a library and remove it from composer.json.


Libraries definition

Example of composer.json generated by the following command: composer require monolog/monolog


Versions

The different authorized versions of the libraries are defined by:


Supported frameworks

*
Symfony Symfony is a free and open-source PHP web application framework and a set of reusable PHP component libraries. It was published as free software on October 18, 2005, and released under the MIT license. Goal Symfony aims to speed up the creati ...
version 2 and later * Laravel version 4 and later * CodeIgniter version 3.0 and later * CakePHP version 3.0 and later *
FuelPHP FuelPHP is an open-source web application framework written in PHP which implements the HMVC pattern. History The FuelPHP project commenced in October 2010, with its major contributors beinHarro VertonDrupal Drupal () is a free and open-source web content management system (CMS) written in PHP and distributed under the GNU General Public License. Drupal provides an open-source back-end framework for at least 14% of the top 10,000 websites worldwide ...
version 8 and later * TYPO3 version 6.2 and later * SilverStripe version 3.0 later * Magento version 2.0 later * Yii version 1.1 and later * Laminas * Silex (web framework) * Lumen (web framework) *Adianti Framework version 1 and later


See also

* PEAR


References


External links

*
Composer on GitHub

Composer documentation

Composer Tutorial

Packagist - the main Composer repository
* {{Package management systems Free package management systems Free software programmed in PHP PHP software