The following products provide Composer as a global, pre-installed, command-line (CLI) tool:
Acquia Pipelines:
This product supports Composer 1 and Composer 2. For more information, see Tools.
Cloud IDE:
This product provides Composer 2 by default. This means that if your application calls the composer command, Composer 2 runs by default. You can change this behavior in the following ways:
The following products either require Composer to be globally installed in your development environment, or are dependent on your application being created through a compatible Composer version:
For more information on using Composer to install Drupal core or contrib modules, see Installing a Drupal distribution through Composer.
Remote Administration supports applications built with both Composer 1 and 2.
Acquia’s Drupal modules and profiles, including Acquia DAM and Content Hub, support both Composer 1 and Composer 2.
Upgrading to Composer 2 consists of the following steps:
To make your application compatible with Composer 2, follow the guide . You may need to upgrade, remove, or replace certain dependencies that conflict with Composer 2. Following this guide modifies your composer.lock file. Ensure that you commit the changes to this file to complete the upgrade.
Drupal applications running the current Drupal version may encounter CI build failures when upgrading to Composer v2.2 or later. The Composer 2.2 release includes a feature for secure plugin execution, which requires you to declare allowed plugins explicitly in your composer.json file. If you do not declare them, your CI builds might fail with an error.
Solution:
To prevent build failures, add the appropriate code snippet to your composer.json file for the plugins your application uses, as in the following common example:
--- a/composer.json
+++ b/composer.json
@@ -1,4 +1,12 @@
{
"name": "example/example",
"require": {}
+ "config": {
+ "allow-plugins": {
+ "composer/installers": true,
+ "cweagans/composer-patches": true,
+ "drupal/core-composer-scaffold": true,
+ "drupal/core-project-message": true
+ }
+ }
}If you created your application with acquia/drupal-recommended-project (v1.8.2 or later) or acquia/drupal-minimal-project (1.4.3 or later), you do not need to update your composer.json file.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.