Composer (software) explained

Composer
Logo Size:120px
Developer:Nils Adermann,
Jordi Boggiano
Programming Language:PHP
Operating System:Cross-platform
Genre:Package manager
License:MIT License

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.[1] Composer is strongly inspired by Node.js's "npm" and Ruby's "bundler".[2] The project's dependency solving algorithm started out as a PHP-based port of openSUSE's libzypp SAT solver.[3]

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"[4] 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 :[5]

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:[6]

Symbol Role (placed before a version number) Example
>= allows to extend the number. Moreover, we can use: >, <, <=. "php": ">=5.5.9" includes PHP 7.
= excludes a version.
- defines a range of versions.
extends to all subversions. "symfony/symfony": "3.1.*" includes the 3.1.1.
~ extends to the next versions of the same level. "doctrine/orm": "~2.5" also concerns the 2.6, but neither the 2.4 nor the 3.0.
^ same as tilde, only if there is a backward compatibility.

Supported frameworks

See also

External links

Notes and References

  1. https://github.com/composer/composer/releases/tag/1.0.0-alpha1 Software release
  2. https://getcomposer.org/doc/00-intro.md#dependency-management Getting Started/Dependency management
  3. Web site: composer/composer. Jun 23, 2020. Jun 24, 2020. GitHub.
  4. See packagist.org
  5. Web site: Command-line interface / Commands . getcomposer.org.
  6. Web site: Versions and constraints - Composer. getcomposer.org.