From 4abdde6f16c7966d5e40c620c3951b17518a1317 Mon Sep 17 00:00:00 2001 From: Bec White Date: Thu, 17 Mar 2022 11:23:14 -0500 Subject: [PATCH] Require Composer ^2.2.2 in the composer.json file. --- README.md | 2 ++ bin/the-build-installer | 11 ++--------- composer.json | 7 ++++++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1672e826..e5564a42 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ _Note: If you are starting a new a project, you may be looking for the [drupal-s $> composer require palantirnet/the-build ``` +Composer 2.2.2 or greater is required for the-build. + ## Setting up Install the default templates and phing targets to your project: diff --git a/bin/the-build-installer b/bin/the-build-installer index 04afa1f8..928b3e22 100755 --- a/bin/the-build-installer +++ b/bin/the-build-installer @@ -5,10 +5,8 @@ # The install command boils down to: # vendor/bin/phing -f vendor/palantirnet/the-build/targets/install.xml # -# This script is "weird", because: -# * Script proxying was added in Composer 2.2.0 -# * The environment variable COMPOSER_BIN_DIR was added in Composer 2.2.2 -# * The environment variable was changed to COMPOSER_RUNTIME_BIN_DIR in Composer 2.2.7 +# * This script requires Composer 2.2.2 or greater, because of a series of script proxying +# changes between 2.1.x and 2.2.2. This requirement is enforced in composer.json. # * This script assumes the composer bin dir is at vendor/bin/ # Composer 2.2.2 through 2.2.6 @@ -16,9 +14,4 @@ if [ "$COMPOSER_BIN_DIR" != "" ]; then COMPOSER_RUNTIME_BIN_DIR="$COMPOSER_BIN_DIR" fi -if [ "$COMPOSER_RUNTIME_BIN_DIR" = "" ]; then - echo "Please update to at least Composer version 2.2.2" - exit 1 -fi - (cd $COMPOSER_RUNTIME_BIN_DIR/../../ && $COMPOSER_RUNTIME_BIN_DIR/phing -f $COMPOSER_RUNTIME_BIN_DIR/../palantirnet/the-build/targets/install.xml) diff --git a/composer.json b/composer.json index 8b0355a5..6e146a17 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ "bin/the-build-installer" ], "require": { + "composer-runtime-api": "^2.2.2", "cweagans/composer-patches": "^1.7", "drupal/coder": "^8.3.6", "drush/drush": "^9 || ^10", @@ -29,7 +30,11 @@ } }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "cweagans/composer-patches": true + } }, "extra": { "patches": {