From fe24e9c079e78970bd5a25dc223192c41490e279 Mon Sep 17 00:00:00 2001 From: Julien Boudry Date: Sat, 31 Dec 2022 11:56:40 +0100 Subject: [PATCH] [PHP] Enable Mbstring Mbstring is such a popular PHP extension that it is used everywhere and most libraries don't work without it. It can be compiled directly with PHP. The official Docker images of PHP include it. --- src/php/devcontainer-feature.json | 2 +- src/php/install.sh | 2 +- test/php/test.sh | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/php/devcontainer-feature.json b/src/php/devcontainer-feature.json index bad987872..edf56eb4d 100644 --- a/src/php/devcontainer-feature.json +++ b/src/php/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "php", - "version": "1.0.9", + "version": "1.0.10", "name": "PHP", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/php", "options": { diff --git a/src/php/install.sh b/src/php/install.sh index 381bec21b..4d0b2eae9 100755 --- a/src/php/install.sh +++ b/src/php/install.sh @@ -169,7 +169,7 @@ install_php() { VERSION_CONFIG="--with-pear" fi - ./configure --prefix="${PHP_INSTALL_DIR}" --with-config-file-path="$PHP_INI_DIR" --with-config-file-scan-dir="$CONF_DIR" --enable-option-checking=fatal --with-curl --with-libedit --with-openssl --with-zlib --with-password-argon2 --with-sodium=shared "$VERSION_CONFIG" EXTENSION_DIR="$PHP_EXT_DIR"; + ./configure --prefix="${PHP_INSTALL_DIR}" --with-config-file-path="$PHP_INI_DIR" --with-config-file-scan-dir="$CONF_DIR" --enable-option-checking=fatal --with-curl --with-libedit --enable-mbstring --with-openssl --with-zlib --with-password-argon2 --with-sodium=shared "$VERSION_CONFIG" EXTENSION_DIR="$PHP_EXT_DIR"; make -j "$(nproc)" find -type f -name '*.a' -delete diff --git a/test/php/test.sh b/test/php/test.sh index 3e4e7223a..0f49c1a18 100755 --- a/test/php/test.sh +++ b/test/php/test.sh @@ -6,6 +6,7 @@ set -e source dev-container-features-test-lib check "PHP version" php --version +check "Mbstring loaded" php -r "extension_loaded('mbstring') || throw new Error('Extension Mbstring is not loaded');" check "Composer version" composer --version # Report result