Composer is a package manager for PHP.


Read the installation docs.

# Install
php composer.phar install

# Alternate install
# See:
curl -sS | php
mv composer.phar /usr/local/bin/composer

Moving composer.phar into /user/local/bin/composer makes it available from any directory. Make sure this directory is added to your shell’s PATH environment variable.


# Requires sudo to write
sudo composer self-update


Install packages

Install the exact package versions specified in composer.lock. This should be used immediately:

  • After project setup
  • After changing Git branches
composer install

Update packages

Updates all packages, their dependenices, and composer.lock.

composer update

Update specific packages

Updates a specific package, its dependencies, and composer.lock.

composer update {namespace}/{packageName}


Missing GMP extension

Composer requires PHP + GMP extension to execute. The PHP library in your shell’s PATH may not include that. Switch PHP versions:

  1. Develop > Command Line > PHP
  2. Try running composer install again.