Skip to content

Commit f9bc857

Browse files
authored
MCLOUD-8404: Set composer 2.1.x by default in PHP 8.x images (#83)
1 parent e6724b2 commit f9bc857

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

images/php/8.0-cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is automatically generated. Do not edit directly. #
22
FROM php:8.0-cli
33

4-
ARG COMPOSER_VERSION=1.10.22
4+
ARG COMPOSER_VERSION=2.1.14
55
ARG MAGENTO_ROOT=/app
66
ARG COMPOSER_ALLOW_SUPERUSER=1
77
ARG COMPOSER_HOME=/composer

images/php/8.1-cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is automatically generated. Do not edit directly. #
22
FROM php:8.1-cli
33

4-
ARG COMPOSER_VERSION=1.10.22
4+
ARG COMPOSER_VERSION=2.1.14
55
ARG MAGENTO_ROOT=/app
66
ARG COMPOSER_ALLOW_SUPERUSER=1
77
ARG COMPOSER_HOME=/composer

images/php/cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{%note%}
22
FROM php:{%version%}-cli
33

4-
ARG COMPOSER_VERSION=1.10.22
4+
ARG COMPOSER_VERSION={%composer_version%}
55
ARG MAGENTO_ROOT=/app
66
ARG COMPOSER_ALLOW_SUPERUSER=1
77
ARG COMPOSER_HOME=/composer

src/Command/Image/GeneratePhp.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ private function buildDockerfile(string $dockerfile, string $phpVersion, string
297297
[
298298
'{%note%}' => '# This file is automatically generated. Do not edit directly. #',
299299
'{%version%}' => $phpVersion,
300+
'{%composer_version%}' => $this->semver::satisfies($phpVersion, '<8.0')
301+
? '1.10.22'
302+
: '2.1.14',
300303
'{%packages%}' => implode(" \\\n ", array_unique($packages)),
301304
'{%docker-php-ext-configure%}' => implode(PHP_EOL, $phpExtCoreConfigOptions),
302305
'{%docker-php-ext-install%}' => $phpExtCore

0 commit comments

Comments
 (0)