Add composer allow-plugins to composer.json for Varbase and Varbase Project template to work with Composer 2.2.1 and later versions

Created on 23 December 2021, almost 3 years ago
Updated 27 July 2024, 4 months ago

Problem/Motivation

Composer 2.2.1 was released 2021-12-22
https://getcomposer.org/changelog/2.2.1
https://github.com/composer/composer/releases/tag/2.2.1

  • Fixed plugin autoloading including files autoload rules from the root package (#10382)
  • Fixed issue parsing php files with unterminated comments found inside backticks (#10385)

https://getcomposer.org/doc/06-config.md#allow-plugins

After updating the composer in local or in an automated testing you will face the following issue

composer/installers contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "composer/installers" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
y - add package to allow-plugins in composer.json and let it run immediately
n - add package (as disallowed) to allow-plugins in composer.json to suppress further prompts
d - discard this, do not change composer.json and do not allow the plugin to run
? - print help

A question to trust will show up for each used composer plugin in Varbase

Do you trust "composer/installers" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
cweagans/composer-patches contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "cweagans/composer-patches" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
oomphinc/composer-installers-extender contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "oomphinc/composer-installers-extender" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
drupal/core-composer-scaffold contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "drupal/core-composer-scaffold" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
drupal/core-project-message contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "drupal/core-project-message" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
vardot/varbase-updater contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "vardot/varbase-updater" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
dealerdirect/phpcodesniffer-composer-installer (installed globally) contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
dealerdirect/phpcodesniffer-composer-installer (installed globally) contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "dealerdirect/phpcodesniffer-composer-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y

Proposed resolution

Adding allow-plugins to Varbase and Varbase Project template
Not to block builds or updates.

  "config": {
    "bin-dir": "bin/",
    "secure-http": false,
    "optimize-autoloader": true,
    "preferred-install": {
      "drupal/core": "dist"
    },
    "allow-plugins": {
      "composer/installers": true,
      "cweagans/composer-patches": true,
      "oomphinc/composer-installers-extender": true,
      "drupal/core-composer-scaffold": true,
      "drupal/core-project-message": true,
      "vardot/varbase-updater": true
    }
  },

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ✅ Automated unit/functional testing coverage

  • ✅ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release varbase-9.0.4

Varbase update type:

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A
📌 Task
Status

Fixed

Version

9.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024