Skip to content

Commit 8f7eec8

Browse files
[PHP] Enable Mbstring (devcontainers#371)
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.
1 parent 2c646ed commit 8f7eec8

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/php/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "php",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"name": "PHP",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/php",
66
"options": {

src/php/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ install_php() {
169169
VERSION_CONFIG="--with-pear"
170170
fi
171171

172-
./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";
172+
./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";
173173

174174
make -j "$(nproc)"
175175
find -type f -name '*.a' -delete

test/php/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -e
66
source dev-container-features-test-lib
77

88
check "PHP version" php --version
9+
check "Mbstring loaded" php -r "extension_loaded('mbstring') || throw new Error('Extension Mbstring is not loaded');"
910
check "Composer version" composer --version
1011

1112
# Report result

0 commit comments

Comments
 (0)