From e5be049d0da3dc9efbaf22536855c4241a28d6d8 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 27 Jun 2022 11:23:32 +1200 Subject: [PATCH] FIX Ensure at least silverstripe/vendor-plugin 1.5.2 (#21) --- .github/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6835e6..0d9c7ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -318,9 +318,12 @@ jobs: composer require $MATRIX_COMPOSER_REQUIRE_EXTRA --no-update fi - # Ensure composer.json has prefer-stable true and minimum-stability dev - # Update preferred-install to source for recipes and some modules that run - # other unit-tests in other modules + # a) Ensure composer.json has prefer-stable true and minimum-stability dev + # b) Update preferred-install to source for recipes and some modules that run + # other unit-tests in other modules + # c) Prevent installation of silverstripe/vendor-plugin < 1.5.2 which contains a bugfix + # which is required for --prefer-lowest to install + # https://github.com/silverstripe/vendor-plugin/pull/49 php -r ' $j = json_decode(file_get_contents("composer.json")); $j->{"prefer-stable"} = true; @@ -338,6 +341,10 @@ jobs: $j->config->{"preferred-install"}->{"cwp/*"} = "source"; $j->config->{"preferred-install"}->{"tractorcow/*"} = "source"; $j->config->{"preferred-install"}->{"*"} = "dist"; + if (empty($j->conflict)) { + $j->conflict = new stdClass(); + } + $j->conflict->{"silverstripe/vendor-plugin"} = "<1.5.2"; file_put_contents("composer.json", json_encode($j, JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES)); '