HOME

TheInfoList



OR:

Composer is an application-level dependency manager for the
PHP PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group. ...
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
that provides a standard format for managing dependencies of PHP software and required
libraries A library is a collection of Document, materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or electronic media, digital access (soft copies) materials, and may be a ...
. 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 A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
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 free and open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern and based on Symfony. Some of the features o ...
version 4 and later *
CodeIgniter CodeIgniter is an open-source software rapid development web framework, for use in building dynamic web sites with PHP. Popularity CodeIgniter is loosely based on the popular model–view–controller (MVC) development pattern. While controller ...
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 engineer ...
version 3.0 and later * FuelPHP version 2.0 and later * Drupal version 8 and later * TYPO3 version 6.2 and later *
SilverStripe Silverstripe CMS is a free and open source content management system (CMS) and framework for creating and maintaining websites and web applications. It provides an out of the box web-based administration panel that enables users to make modificat ...
version 3.0 later *
Magento Magento is an open-source e-commerce platform written in PHP. It uses multiple other PHP frameworks such as Laminas (formerly known as Zend Framework) and Symfony. Magento source code is distributed under Open Software License (OSL) v3.0. Ma ...
version 2.0 later *
Yii Yii is an open source, object-oriented, component-based MVC PHP web application framework. Yii is pronounced as "Yee" or i:and in Chinese it means "simple and evolutionary" and it can be an acronym for "Yes It Is!". History Yii started ...
version 1.1 and later *
Laminas Laminas Project (formerly Zend Framework or ZF) is an open source, object-oriented web application framework implemented in PHP 7 and licensed under the New BSD License. The framework is basically a collection of professional PHP-based pack ...
*
Silex (web framework) Silex is a micro web framework written in PHP and based on Symfony, Twig (template engine) and Doctrine (database abstraction). It is MIT Licensed. The general purpose of Silex is to be as lightweight as you need it to be, as it is made for ...
*
Lumen (web framework) Lumen can refer to: * Lumen (unit), the SI unit of luminous flux * Lumen (anatomy), the cavity or channel within a tubular structure * Lumen (band), a Russian rock band * Lumen (branding agency), a design and branding company headquartered in Mila ...
*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 the Northern Hemisphere in late summer into October. The pear tree and shrub are a species of genus ''Pyrus'' , in the family Rosaceae, bearing the 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 PHP software