From fcb6b5b50d74784ea232f88d9713f0c69e8c1825 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Wed, 25 Nov 2026 23:36:45 +0100 Subject: [PATCH] Add the gmp extension, installed but disabled by default --- Dockerfile | 5 +++++ tests/test_2_extensions.php | 1 + tests/test_3_manual_enabling_extensions.php | 1 + tests/test_3_manual_extensions.ini | 1 + 4 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 69465cf7..99dfa643 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,6 +47,8 @@ RUN set -xe; \ libcurl4-openssl-dev \ # ffi libffi-dev \ + # gmp + libgmp-dev \ # intl libicu-dev \ # mbstring (regular expressions) @@ -135,6 +137,7 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O2 -ffunction-sections -fdata- --with-sqlite3 \ --with-pdo-sqlite \ # Separate .so extensions so that they are not loaded by default + --with-gmp=shared \ --enable-intl=shared \ --enable-soap=shared \ # Needed by `pecl` to install extensions (in this image and in images built on it) @@ -190,6 +193,8 @@ RUN set -xe; \ libcurl4t64 \ # ffi libffi8 \ + # gmp + libgmp10 \ # intl libicu78 \ # mbstring (regular expressions) diff --git a/tests/test_2_extensions.php b/tests/test_2_extensions.php index bfa11769..42a413d3 100644 --- a/tests/test_2_extensions.php +++ b/tests/test_2_extensions.php @@ -144,6 +144,7 @@ } $extensionsDisabledByDefault = [ + 'gmp' => function_exists('gmp_add'), 'intl' => class_exists(\Collator::class), 'apcu' => function_exists('apcu_add'), 'soap' => class_exists(\SoapClient::class), diff --git a/tests/test_3_manual_enabling_extensions.php b/tests/test_3_manual_enabling_extensions.php index 0c5cb7da..69ccdd21 100644 --- a/tests/test_3_manual_enabling_extensions.php +++ b/tests/test_3_manual_enabling_extensions.php @@ -3,6 +3,7 @@ require_once __DIR__ . '/utils.php'; $extensions = [ + 'gmp' => function_exists('gmp_add'), 'intl' => class_exists(\Collator::class), 'apcu' => function_exists('apcu_add'), 'soap' => class_exists(\SoapClient::class), diff --git a/tests/test_3_manual_extensions.ini b/tests/test_3_manual_extensions.ini index 13a22503..fda9151a 100644 --- a/tests/test_3_manual_extensions.ini +++ b/tests/test_3_manual_extensions.ini @@ -1,3 +1,4 @@ +extension=gmp extension=intl extension=apcu extension=soap