For being able to add any Drupal project (module, theme, drush extension) to your composer project, you have to add the Drupal Packagist to your root composer.json‘s repository section:
{
"repositories": [
{
"type": "composer",
"url": "https://packagist.drupal-composer.org"
}
]
}
Basically Drupal Packagist will work for Drupal 8 and Drupal 7 projects.
composer install
, composer require
, composer update
and composer remove
like with any other composer package.
"require": [
{
"drupal/views": "^7.3.0",
"drupal/radix": "7.*",
"drupal/master": "7.3.*"
}
]