HOME

TheInfoList



OR:

Composer is an application-level dependency manager for the PHP
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
that provides a standard format for managing dependencies of PHP software and required
libraries A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
. 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
SAT solver In computer science and formal methods, a SAT solver is a computer program which aims to solve the Boolean satisfiability problem (SAT). On input a formula over Boolean data type, Boolean variables, such as "(''x'' or ''y'') and (''x'' or not ''y'' ...
. Composer runs from the
command line A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
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 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 version 2 and later *
Laravel Laravel is a open-source software, free and open-source PHP-based web framework for building web applications. It was created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) ar ...
version 5 and later * CodeIgniter version 3.0 and later *
CakePHP CakePHP is an open-source web framework. It follows the model–view–controller (MVC) approach and is written in PHP, modeled after the concepts of Ruby on Rails, and distributed under the MIT License. CakePHP uses well-known software engin ...
version 3.0 and later * FuelPHP version 2.0 and later *
Drupal 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 * Neos Flow version 2.0 and later * Silverstripe version 3.0 later * Magento version 2.0 later * OpenMage version 20.0.0 and later * Yii version 1.1 and later * Laminas * Silex (web framework) * Lumen (web framework) *Adianti Framework version 1 and later


See also

*
PEAR Pears are fruits produced and consumed around the world, growing on a tree and harvested in late summer into mid-autumn. The pear tree and shrub are a species of genus ''Pyrus'' , in the Family (biology), family Rosaceae, bearing the Pome, po ...


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 Software using the MIT license