John F Adair Composer

A Dependency Manager for PHP Authors: Nils Adermann, Jordi Boggiano and many community contributions Commercial support & consulting available through: Sponsor Composer & Packagist.org Logo by: Max Grigorian Composer and all content on this site are released under the MIT license.

To quickly install Composer in the current directory, run the following script in your terminal. To automate the installation, use the guide on installing Composer programmatically.

John F Adair Composer 2

Note: Docker specific issues should be filed on the composer/docker repository. Note: You may also use composer instead of composer/composer as image name above. It is shorter and is a Docker official image but is not published directly by us and thus usually receives new releases with a delay of a few days.

John F Adair Composer 3

Installing from composer.lock # If there is already a composer.lock file in the project folder, it means either you ran the update command before, or someone else on the project ran the update command and committed the composer.lock file to the project (which is good).

COMPOSER_IGNORE_PLATFORM_REQ or COMPOSER_IGNORE_PLATFORM_REQS # If COMPOSER_IGNORE_PLATFORM_REQS set to 1, it is the equivalent of passing the --ignore-platform-reqs argument. Otherwise, specifying a comma separated list in COMPOSER_IGNORE_PLATFORM_REQ will ignore those specific requirements.

John F Adair Composer 5

Package # Composer is a dependency manager. It installs packages locally. A package is essentially a directory containing something. In this case it is PHP code, but in theory it could be anything. And it contains a package description which has a name and a version. The name and the version are used to identify the package.

John F Adair Composer 6

When determining valid available versions, Composer looks at all of your tags and branches and translates their names into an internal list of options that it then matches against the version constraint you provided. For more on how Composer treats tags and branches and how it resolves package version constraints, read the versions article.

John F Adair Composer 7