diff --git a/src/DockerFileGenerator.php b/src/DockerFileGenerator.php index 92899a2e2..4c9febf26 100644 --- a/src/DockerFileGenerator.php +++ b/src/DockerFileGenerator.php @@ -41,6 +41,7 @@ final class DockerFileGenerator Dockerfile; private const PHP_DOCKER_IMAGES = [ + '7.4.0' => '7.4-cli-alpine', '7.3.0' => '7.3-cli-alpine', '7.2.0' => '7.2-cli-alpine', '7.1.0' => '7.1-cli-alpine', diff --git a/tests/DockerFileGeneratorTest.php b/tests/DockerFileGeneratorTest.php index d130fe0f3..8245a988f 100644 --- a/tests/DockerFileGeneratorTest.php +++ b/tests/DockerFileGeneratorTest.php @@ -66,7 +66,7 @@ public function test_throws_an_error_if_cannot_find_a_suitable_PHP_image(): void ; } catch (UnexpectedValueException $exception) { $this->assertSame( - 'Could not find a suitable Docker base image for the PHP constraint(s) "^5.3". Images available: "7.3-cli-alpine", "7.2-cli-alpine", "7.1-cli-alpine", "7-cli-alpine"', + 'Could not find a suitable Docker base image for the PHP constraint(s) "^5.3". Images available: "7.4-cli-alpine", "7.3-cli-alpine", "7.2-cli-alpine", "7.1-cli-alpine", "7-cli-alpine"', $exception->getMessage() ); } @@ -150,7 +150,7 @@ public function provideGeneratorRequirements(): Generator ], 'box.phar', <<<'Dockerfile' -FROM php:7.3-cli-alpine +FROM php:7.4-cli-alpine RUN $(php -r '$extensionInstalled = array_map("strtolower", \get_loaded_extensions(false));$requiredExtensions = ["zlib", "phar", "openssl", "pcre", "tokenizer"];$extensionsToInstall = array_diff($requiredExtensions, $extensionInstalled);if ([] !== $extensionsToInstall) {echo \sprintf("docker-php-ext-install %s", implode(" ", $extensionsToInstall));}echo "echo \"No extensions\"";')