Composer
Component ID
1136718
Component name
Composer
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
41656
Component created
Component changed
Component body
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.
