0

I have installed a Drupal 8.0.0 local test site in Windows 7 and I am trying to install Devel via Composer, running: composer require drupal/devel:^4.1. I get the following message in the command line:

Loading "composer/installers" which is a legacy composer-installer built for Composer 1.x, it is likely to cause issues as you are running Composer 2.x. wikimedia/composer-merge-plugin contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "wikimedia/composer-merge-plugin" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?]

[Symfony\Component\Console\Exception\RuntimeException] Aborted

The command-line on the other hand, doesn't give me any user input ability in order to input an answer to the 'Do you trust...' question.

I have tried to remove the

"require": {
    "composer/installers": "^1.0.21",
    "wikimedia/composer-merge-plugin": "~1.3"
  }

entry and the

"allow-plugins": {
        "composer/installers": true,        
        "drupal/core-composer-scaffold": true,
        "drupal/core-project-message": true
    } 

entry from the 'config' key, from composer.json (in the project root directory), but it still doesn't solve the problem.

I would appreciate any help on this.

6
  • 3
    Drupal 8.0.0 is outdated and probably your composer project as well. Use a current Drupal version and the recommended github.com/drupal/recommended-project/blob/9.4.5/composer.json.
    – 4uk4
    Aug 15 at 9:55
  • You are experiencing these problems by trying to install an old insecure version of Drupal from 2015.
    – cilefen
    Aug 15 at 12:12
  • I want to keep Drupal 8 version for the reason that I want to go through a specific Drupal 8 Theming tutorial. Could there be any edits in the project's composer.json file that would allow the plugins, for which it asks me if I trust them? I have also tried to set "allow-plugins: yes" in the 'config' entry, but it won't allow any boolean value, only array.
    – vasilis
    Aug 16 at 5:39
  • 1
    You can use Drupal 9 to follow the tutorial. There will be slight differences but it will be mostly the same. You will run into more problems trying to run Drupal 8, than you will trying to follow the tutorial using Drupal 9.
    – Jaypan
    Aug 16 at 6:03
  • @apaderno, The initial title of my post was "Cannot install a module via composer in Drupal 8" and the "via composer in Drupal8" part was deleted by you, although, I think, keeping this part, makes the question more specific, since, my question is spefically addressed to the installation using Composer. In other words, I wouldn't consider this title part as a redundancy.
    – vasilis
    Aug 16 at 6:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.