Add support for latest patch versions of PHP composer 2.2 - 2.6 (#2128)

* Add support for latest patch versions of PHP composer 2.2 - 2.6

* Resolve review feedback
This commit is contained in:
Cormac McCarthy 2023-09-11 16:06:01 -07:00 коммит произвёл GitHub
Родитель 96b62e0bfe
Коммит 1f41a12d80
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
15 изменённых файлов: 214 добавлений и 52 удалений

Просмотреть файл

@ -2,13 +2,16 @@
PHP_RUNTIME_BASE_TAG='20230831.3'
PHP_FPM_RUNTIME_BASE_TAG='20230831.3'
COMPOSER_VERSION='2.0.8'
COMPOSER_DEFAULT_VERSION='2.0.8'
COMPOSER_SETUP_SHA384='e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02'
COMPOSER1_9_VERSION='1.9.3'
COMPOSER1_10_VERSION='1.10.19'
COMPOSER2_0_VERSION='2.0.8'
COMPOSER2_2_VERSION='2.2.9'
COMPOSER2_3_VERSION='2.3.4'
COMPOSER2_2_VERSION='2.2.21'
COMPOSER2_3_VERSION='2.3.10'
COMPOSER2_4_VERSION='2.4.4'
COMPOSER2_5_VERSION='2.5.8'
COMPOSER2_6_VERSION='2.6.2'
PHP82_VERSION='8.2.9'
PHP82_KEYS='1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544'
PHP82_TAR_SHA256='1e6cb77f997613864ab3127fbfc6a8c7fdaa89a95e8ed6167617b913b4de4765'

Просмотреть файл

@ -172,13 +172,16 @@
constants:
php-runtime-base-tag: 20230831.3
php-fpm-runtime-base-tag: 20230831.3
composer-version: 2.0.8
composer-default-version: 2.0.8
composer-setup-sha384: e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02
composer1-9-version: 1.9.3
composer1-10-version: 1.10.19
composer2-0-version: 2.0.8
composer2-2-version: 2.2.9
composer2-3-version: 2.3.4
composer2-2-version: 2.2.21
composer2-3-version: 2.3.10
composer2-4-version: 2.4.4
composer2-5-version: 2.5.8
composer2-6-version: 2.6.2
php82-version: 8.2.9
php82-keys: 1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544
php82-tar-sha256: 1e6cb77f997613864ab3127fbfc6a8c7fdaa89a95e8ed6167617b913b4de4765

Просмотреть файл

@ -794,7 +794,12 @@
- 2.0.7
- 2.0.8
- 2.2.9
- 2.2.21
- 2.3.4
- 2.3.10
- 2.4.4
- 2.5.8
- 2.6.2
### buster
@ -829,7 +834,12 @@
- 2.0.7
- 2.0.8
- 2.2.9
- 2.2.21
- 2.3.4
- 2.3.10
- 2.4.4
- 2.5.8
- 2.6.2
### focal-scm
@ -864,7 +874,12 @@
- 2.0.7
- 2.0.8
- 2.2.9
- 2.2.21
- 2.3.4
- 2.3.10
- 2.4.4
- 2.5.8
- 2.6.2
### stretch
@ -899,7 +914,12 @@
- 2.0.7
- 2.0.8
- 2.2.9
- 2.2.21
- 2.3.4
- 2.3.10
- 2.4.4
- 2.5.8
- 2.6.2

Просмотреть файл

@ -191,7 +191,7 @@ RUN --mount=type=secret,id=oryx_sdk_storage_account_access_token \
# Copy PHP versions
&& . $buildDir/__phpVersions.sh \
&& $imagesDir/installPlatform.sh php $PHP73_VERSION \
&& $imagesDir/installPlatform.sh php-composer $COMPOSER_VERSION \
&& $imagesDir/installPlatform.sh php-composer $COMPOSER_DEFAULT_VERSION \
&& cd /opt/php \
&& ln -s 7.3 7 \
&& ln -s 7 lts \

Просмотреть файл

@ -10,5 +10,5 @@ RUN set -eux && . /php/__phpVersions.sh && \
export phpbin="/opt/php/$PHP73_VERSION/bin/php" && \
$phpbin -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
$phpbin -r "if (hash_file('sha384', 'composer-setup.php') === '$COMPOSER_SETUP_SHA384') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
$phpbin composer-setup.php --version=$COMPOSER_VERSION --install-dir=/opt/php-composer && \
$phpbin composer-setup.php --version=$COMPOSER_DEFAULT_VERSION --install-dir=/opt/php-composer && \
$phpbin -r "unlink('composer-setup.php');"

Просмотреть файл

@ -30,4 +30,9 @@
2.0.7
2.0.8
2.2.9
2.3.4
2.2.21
2.3.4
2.3.10
2.4.4
2.5.8
2.6.2

Просмотреть файл

@ -30,4 +30,9 @@
2.0.7
2.0.8
2.2.9
2.3.4
2.2.21
2.3.4
2.3.10
2.4.4
2.5.8
2.6.2

Просмотреть файл

@ -30,4 +30,9 @@
2.0.7
2.0.8
2.2.9
2.3.4
2.2.21
2.3.4
2.3.10
2.4.4
2.5.8
2.6.2

Просмотреть файл

@ -30,4 +30,9 @@
2.0.7
2.0.8
2.2.9
2.3.4
2.2.21
2.3.4
2.3.10
2.4.4
2.5.8
2.6.2

Просмотреть файл

@ -313,7 +313,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Php
// Install PHP Composer
if (string.IsNullOrEmpty(phpComposerVersion))
{
phpComposerVersion = PhpVersions.ComposerVersion;
phpComposerVersion = PhpVersions.ComposerDefaultVersion;
}
if (this.phpComposerInstaller.IsVersionAlreadyInstalled(phpComposerVersion))
@ -391,7 +391,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Php
}
// Fallback to default version detection
return PhpVersions.ComposerVersion;
return PhpVersions.ComposerDefaultVersion;
}
}

Просмотреть файл

@ -10,7 +10,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Php
{
public class PhpComposerOnDiskVersionProvider : IPhpComposerVersionProvider
{
private const string DefaultOnDiskVersion = PhpVersions.ComposerVersion;
private const string DefaultOnDiskVersion = PhpVersions.ComposerDefaultVersion;
private readonly ILogger<PhpComposerOnDiskVersionProvider> logger;
public PhpComposerOnDiskVersionProvider(ILogger<PhpComposerOnDiskVersionProvider> logger)

Просмотреть файл

@ -8,13 +8,16 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Common
{
public const string PhpRuntimeBaseTag = "20230831.3";
public const string PhpFpmRuntimeBaseTag = "20230831.3";
public const string ComposerVersion = "2.0.8";
public const string ComposerDefaultVersion = "2.0.8";
public const string ComposerSetupSha384 = "e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02";
public const string Composer19Version = "1.9.3";
public const string Composer110Version = "1.10.19";
public const string Composer20Version = "2.0.8";
public const string Composer22Version = "2.2.9";
public const string Composer23Version = "2.3.4";
public const string Composer22Version = "2.2.21";
public const string Composer23Version = "2.3.10";
public const string Composer24Version = "2.4.4";
public const string Composer25Version = "2.5.8";
public const string Composer26Version = "2.6.2";
public const string Php82Version = "8.2.9";
public const string Php82Keys = "1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544";
public const string Php82TarSha256 = "1e6cb77f997613864ab3127fbfc6a8c7fdaa89a95e8ed6167617b913b4de4765";

Просмотреть файл

@ -496,8 +496,8 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Tests.Php
isPhpComposerAlreadyInstalled = isPhpComposerAlreadyInstalled ?? true;
phpComposerInstallationScript = phpComposerInstallationScript ?? "default-php-composer-installation-script";
var versionProvider = new TestPhpVersionProvider(supportedPhpVersions, defaultVersion);
supportedPhpComposerVersions = supportedPhpComposerVersions ?? new[] { PhpVersions.ComposerVersion };
defaultComposerVersion = defaultComposerVersion ?? PhpVersions.ComposerVersion;
supportedPhpComposerVersions = supportedPhpComposerVersions ?? new[] { PhpVersions.ComposerDefaultVersion };
defaultComposerVersion = defaultComposerVersion ?? PhpVersions.ComposerDefaultVersion;
var composerVersionProvider = new TestPhpComposerVersionProvider(
supportedPhpComposerVersions,
defaultComposerVersion);

Просмотреть файл

@ -7,7 +7,6 @@ using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Microsoft.Oryx.BuildScriptGenerator.Common;
using Microsoft.Oryx.BuildScriptGenerator.Php;
using Microsoft.Oryx.Detector;
using Microsoft.Oryx.Detector.Php;
using Xunit;
@ -128,10 +127,10 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Tests.Php
PhpScriptGeneratorOptions phpScriptGeneratorOptions)
{
var phpVersionProvider = new TestPhpVersionProvider(
supportedPhpVersions: new[] { "7.2.15", Common.PhpVersions.Php73Version });
supportedPhpVersions: new[] { "7.2.15", PhpVersions.Php73Version });
var phpComposerVersionProvider = new TestPhpComposerVersionProvider(
supportedPhpComposerVersions: new[] { "7.2.15", Common.PhpVersions.ComposerVersion });
supportedPhpComposerVersions: new[] { "7.2.15", PhpVersions.ComposerDefaultVersion });
phpScriptGeneratorOptions = phpScriptGeneratorOptions ?? new PhpScriptGeneratorOptions();
commonOptions = commonOptions ?? new BuildScriptGeneratorOptions();
@ -183,7 +182,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Tests.Php
{
return PlatformVersionInfo.CreateOnDiskVersionInfo(
_supportedPhpComposerVersions,
PhpVersions.ComposerVersion);
PhpVersions.ComposerDefaultVersion);
}
}
}

Просмотреть файл

@ -5,9 +5,7 @@
using System.Collections.Generic;
using System.IO;
using Microsoft.Oryx.BuildImage.Tests;
using Microsoft.Oryx.BuildScriptGenerator.Common;
using Microsoft.Oryx.BuildScriptGenerator.Node;
using Microsoft.Oryx.BuildScriptGenerator.Php;
using Microsoft.Oryx.Tests.Common;
using Xunit;
@ -25,21 +23,32 @@ namespace Microsoft.Oryx.BuildImage.Tests
{
get
{
// test default php-composer version
// Test default PHP composer version
var data = new TheoryData<string, string, string>();
data.Add(
PhpVersions.Php73Version,
ImageTestHelper.WithRestrictedPermissions().GetGitHubActionsBuildImage(),
PhpVersions.ComposerVersion
PhpVersions.ComposerDefaultVersion
);
var imageHelper = new ImageTestHelper();
data.Add(PhpVersions.Php74Version, imageHelper.GetGitHubActionsBuildImage(), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php74Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php80Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php81Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php82Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php74Version, imageHelper.GetGitHubActionsBuildImage(), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php74Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php80Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php81Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php82Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.ComposerDefaultVersion);
// test latest php-composer version
// Test PHP composer version 2.2.x
data.Add(
PhpVersions.Php73Version,
ImageTestHelper.WithRestrictedPermissions().GetGitHubActionsBuildImage(),
PhpVersions.Composer22Version
);
data.Add(PhpVersions.Php74Version, imageHelper.GetGitHubActionsBuildImage(), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer22Version);
// Test PHP composer version 2.3.x
data.Add(
PhpVersions.Php73Version,
ImageTestHelper.WithRestrictedPermissions().GetGitHubActionsBuildImage(),
@ -49,6 +58,39 @@ namespace Microsoft.Oryx.BuildImage.Tests
data.Add(PhpVersions.Php80Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer23Version);
// Test PHP composer version 2.4.x
data.Add(
PhpVersions.Php73Version,
ImageTestHelper.WithRestrictedPermissions().GetGitHubActionsBuildImage(),
PhpVersions.Composer24Version
);
data.Add(PhpVersions.Php74Version, imageHelper.GetGitHubActionsBuildImage(), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer24Version);
// Test PHP composer version 2.5.x
data.Add(
PhpVersions.Php73Version,
ImageTestHelper.WithRestrictedPermissions().GetGitHubActionsBuildImage(),
PhpVersions.Composer25Version
);
data.Add(PhpVersions.Php74Version, imageHelper.GetGitHubActionsBuildImage(), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer25Version);
// Test PHP composer version 2.6.x
data.Add(
PhpVersions.Php73Version,
ImageTestHelper.WithRestrictedPermissions().GetGitHubActionsBuildImage(),
PhpVersions.Composer26Version
);
data.Add(PhpVersions.Php74Version, imageHelper.GetGitHubActionsBuildImage(), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster), PhpVersions.Composer26Version);
return data;
}
}
@ -59,12 +101,30 @@ namespace Microsoft.Oryx.BuildImage.Tests
{
var data = new TheoryData<string, string, string>();
var imageHelper = new ImageTestHelper();
data.Add(PhpVersions.Php73Version, imageHelper.GetCliImage(),PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(), PhpVersions.ComposerVersion);
// test latest php-composer version
// Test default PHP composer version
data.Add(PhpVersions.Php73Version, imageHelper.GetCliImage(),PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(), PhpVersions.ComposerDefaultVersion);
// Test PHP composer version 2.2.x
data.Add(PhpVersions.Php73Version, imageHelper.GetCliImage(), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(), PhpVersions.Composer22Version);
// Test PHP composer version 2.3.x
data.Add(PhpVersions.Php73Version, imageHelper.GetCliImage(), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(), PhpVersions.Composer23Version);
// Test PHP composer version 2.4.x
data.Add(PhpVersions.Php73Version, imageHelper.GetCliImage(), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(), PhpVersions.Composer24Version);
// Test PHP composer version 2.5.x
data.Add(PhpVersions.Php73Version, imageHelper.GetCliImage(), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(), PhpVersions.Composer25Version);
// Test PHP composer version 2.6.x
data.Add(PhpVersions.Php73Version, imageHelper.GetCliImage(), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(), PhpVersions.Composer26Version);
return data;
}
}
@ -75,12 +135,14 @@ namespace Microsoft.Oryx.BuildImage.Tests
{
var data = new TheoryData<string, string, string>();
var imageHelper = new ImageTestHelper();
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerVersion);
// test latest php-composer version
// Test default PHP composer version
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerDefaultVersion);
// Test PHP composer version 2.3.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.Composer23Version);
@ -95,16 +157,42 @@ namespace Microsoft.Oryx.BuildImage.Tests
{
var data = new TheoryData<string, string, string>();
var imageHelper = new ImageTestHelper();
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerVersion);
// test latest php-composer version
// Test default PHP composer version
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerDefaultVersion);
// Test PHP composer version 2.2.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer22Version);
// Test PHP composer version 2.3.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer23Version);
// Test PHP composer version 2.4.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer24Version);
// Test PHP composer version 2.5.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer25Version);
// Test PHP composer version 2.6.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer26Version);
return data;
}
}
@ -115,16 +203,42 @@ namespace Microsoft.Oryx.BuildImage.Tests
{
var data = new TheoryData<string, string, string>();
var imageHelper = new ImageTestHelper();
data.Add(PhpVersions.Php74Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.ComposerVersion);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.ComposerVersion);
// test latest php-composer version
// Test default PHP composer version
data.Add(PhpVersions.Php74Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.ComposerDefaultVersion);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.ComposerDefaultVersion);
// Test PHP composer version 2.2.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer22Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer22Version);
// Test PHP composer version 2.3.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer23Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer23Version);
// Test PHP composer version 2.4.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer24Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer24Version);
// Test PHP composer version 2.5.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer25Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer25Version);
// Test PHP composer version 2.6.x
data.Add(PhpVersions.Php74Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php80Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php81Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer26Version);
data.Add(PhpVersions.Php82Version, imageHelper.GetCliBuilderImage(ImageTestHelperConstants.CliBuilderBullseyeTag), PhpVersions.Composer26Version);
return data;
}
}