2

Let's say we need to install these 2 modules :

composer require 'drupal/redirect:^1.4'
composer require 'drupal/pathauto:^1.4'

I couldn't find the correct syntax so I've tried this but it doesn't work :

composer require 'drupal/redirect:^1.4'; 'drupal/pathauto:^1.4'
composer require 'drupal/redirect:^1.4', 'drupal/pathauto:^1.4'
composer require 'drupal/redirect:^1.4'/'drupal/pathauto:^1.4'

Actually I install 1st module "redirect " and after installation is completed, I install the 2nd one "pathauto".

I would like to create a script that will install all the necessary modules I need.

2
  • 4
    This is more a composer based question rather than Drupal. But have you tried just a space between each item? That's the usual way in composer to list multiple packages
    – Leigh
    Sep 5 '19 at 14:20
  • You're right, just a space is enough composer require 'drupal/adminimal_theme:^1.5' 'drupal/adminimal_admin_toolbar:^1.9' Sep 5 '19 at 14:25
10

You can write the names of multiple packages separated by spaces. For example:

composer require drupal/adminimal_theme:^1.5 drupal/adminimal_admin_toolbar:^1.9

Not the answer you're looking for? Browse other questions tagged or ask your own question.