craftcms / craft

Composer starter project for Craft CMS.
https://craftcms.com
BSD Zero Clause License
188 stars 91 forks source link

fix: Fix Composer 2.2.0 error by adding `allow-plugins` #74

Closed khalwat closed 2 years ago

khalwat commented 2 years ago

Fix Composer 2.2.0 error by adding allow-plugins

If you don't do this, with Composer 2.2.0 and later, you'll see a warning, and in non-interactive mode, the plugins will never be run, and the composer install will hang

Screen Shot 2021-12-25 at 3 10 04 PM

This PR adds the following to the "config": section of the composer.json file:

    "allow-plugins": {
      "craftcms/plugin-installer": true,
      "yiisoft/yii2-composer": true
    },

Merry Christmas!

khalwat commented 2 years ago

btw they claim this isn't an issue if you're using --no-interaction:

UX Change: Added allow-plugins config value to enhance security against runtime execution, this will prompt you the first time you use a plugin and may hang pipelines if they aren't using --no-interaction (-n) as they should (#10314)

ref: https://github.com/composer/composer/blob/main/CHANGELOG.md

...but I'm already using --no-interaction and it still hangs (and you'll likely want allow-plugins going forward anyway)