Europe's Drupal Developer focused event is coming up between 19-22 July 2023 in Vienna! Meet core developers and the minds behind some of the key projects and initiatives!Composer is a PHP package management tool to help manage your project or libraries' dependencies. This project allows use of Composer from Drush.
Installation
drush dl composer-8
Manual
git clone --branch 8.x-1.x http://git.drupal.org/project/composer.git ~/.drush/composer
Since this is Drush extension that works across all versions of Drush, it doesn't need a different release for each different Drupal version. Hence this just being an 8.x project.
Usage
drush composer- Lists all available Composer commands.
drush composer install- Parses composer.json, and installs all dependencies
drush composer update- Updates your dependencies to the latest version, and updates cached information.
drush composer init- Walk through a wizard to create your own composer.json file.
drush composer create-project symfony/symfony- Downloads the symfony/symfony project and all its dependencies.
Modules
This is a list of some of the Drupal modules that integrate with Composer.
- Composer Manager
- Provides a user interface to let you know when you should update your dependencies, along with a single library space and autoloader.
- Composer Autoload
- This module automatically loads all autoload.php files and cache them appropriately.
- Composer Vendor
- Similar to Composer Autoload, but expects your vendor code to be at sites/all/vendor.
- Symfony module
- An example of a Drupal module using Composer for its external dependencies.
- Git Wrapper
- Allows integration with a Git repository.
Example
The following is an example of a composer.json file that will download the latest in the 1.0.* branch of Monolog...
{
"require": {
"monolog/monolog": "1.0.*"
}
}
See Packagist for a repository of available packages to install and depend on.
Project information
Seeking new maintainer
The current maintainers are looking for new people to take ownership.- Module categories: Developer, Drush, Utility
- Created by brynbellomy on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 8.x-1.x-dev updated 6 Mar 2020 at 17:51 UTC













