diff --git a/Dockerfile.template b/Dockerfile.template index 05390c3..8ed671d 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,7 +1,6 @@ FROM php:${php.version}-cli-${php.variant} -# Magento 2 does not support Composer 2 -COPY --from=composer:1 /usr/bin/composer /usr/bin/composer +COPY --from=composer:${composer} /usr/bin/composer /usr/bin/composer <% if (php.variant.startsWith('alpine')) { %> RUN apk add --no-cache unzip \ diff --git a/lib/index.js b/lib/index.js index 100ffb9..6a94b33 100644 --- a/lib/index.js +++ b/lib/index.js @@ -31,6 +31,7 @@ for (const magentoVersion of magentoVersions) { for (const phpVariant of semverMetrixConfig.php) { matrixVersions.push({ magento: magentoVersion, + composer: semverMetrixConfig.composer, php: phpVariant.version, variant: phpVariant.variant }); @@ -48,6 +49,7 @@ matrixVersions = tags(matrixVersions); for (const matrixVersion of matrixVersions) { const matrixDockerfile = _.template(dockerfile)({ magento: matrixVersion.version.magento, + composer: matrixVersion.version.composer, php: { version: matrixVersion.version.php, variant: matrixVersion.version.variant @@ -59,6 +61,7 @@ for (const matrixVersion of matrixVersions) { matrix.push({ version: matrixVersion.version.magento, + composer: matrixVersion.version.composer, php: { version: matrixVersion.version.php, variant: matrixVersion.version.variant diff --git a/lib/package.json b/lib/package.json index 11f591c..c34e669 100644 --- a/lib/package.json +++ b/lib/package.json @@ -6,5 +6,8 @@ "lodash": "^4.17.20", "path": "^0.12.7", "semver": "^7.3.4" + }, + "volta": { + "node": "14.21.3" } } diff --git a/versions.json b/versions.json index a1b4479..9709e5f 100644 --- a/versions.json +++ b/versions.json @@ -1,5 +1,6 @@ { ">= 2.4": { + "composer": "2", "php": [ { "version": "8.1", @@ -36,6 +37,7 @@ ] }, ">= 2.3": { + "composer": "1", "php": [ { "version": "7.3",