diff --git a/CHANGELOG.md b/CHANGELOG.md index 35bda063..ca53797a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Minor changes * **2026-10-09** + * Imagick can read SVG images (also WMF, DjVu and OpenEXR): the fat images are ~17MB larger + * Add the `opentelemetry` extension on PHP 8.2+ * Upgrade Supercronic from 0.1.9 to 0.2.49 (built with an up-to-date Go version) * Fix Composer and NodeJS binaries (`vendor/bin`, `node_modules/.bin` and global Composer binaries) not found by `docker exec` / `docker compose exec` when run without their path * Fix extensions that could not be loaded without another extension: the required extensions are now enabled with them (`memcached` requires `igbinary` and `msgpack`, `redis` requires `igbinary`, `mailparse` requires `mbstring` and `swoole` requires `curl`) diff --git a/README.md b/README.md index 8328d55d..a736dfd3 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ Below is a list of extensions available in this image: **Enabled by default (in addition to extensions enabled in Slim image):** `apcu`, `hash`, `iconv`, `igbinary`, `mysqli`, `mysqlnd`, `redis`, `soap`, `xsl`, `zlib` and all enabled in slim. -**Available (can be enabled using environment variables):** `amqp` `ast` `bcmath` `blackfire` `bz2` `dba` `decimal` `ds` `enchant` `exif` `excimer` `ffi` `mailparse` `msgpack` `gd` `gettext` `gmp` `gnupg` `grpc` `igbinary` `imagick` `imap` `inotify` `intl` `ldap` `lz4` `mcrypt` `memcached` `mongodb` `odbc` `pcov` `pdo_dblib` `pdo_odbc` `pdo_pgsql` `pdo_sqlite` `pgsql` `pspell` `rdkafka` `shmop` `snmp` `sockets` `sqlite3` `swoole` `tidy` `uploadprogress` `uuid` `xdebug` `xmlrpc` `xsl` `yaml` `zstd` +**Available (can be enabled using environment variables):** `amqp` `ast` `bcmath` `blackfire` `bz2` `dba` `decimal` `ds` `enchant` `exif` `excimer` `ffi` `mailparse` `msgpack` `gd` `gettext` `gmp` `gnupg` `grpc` `igbinary` `imagick` `imap` `inotify` `intl` `ldap` `lz4` `mcrypt` `memcached` `mongodb` `odbc` `opentelemetry` `pcov` `pdo_dblib` `pdo_odbc` `pdo_pgsql` `pdo_sqlite` `pgsql` `pspell` `rdkafka` `shmop` `snmp` `sockets` `sqlite3` `swoole` `tidy` `uploadprogress` `uuid` `xdebug` `xmlrpc` `xsl` `yaml` `zstd` This list can be outdated, you can verify by executing : `docker run --rm -it thecodingmachine/php:8.4-v5-cli php -m` @@ -196,6 +196,8 @@ This list can be outdated, you can verify by executing : `docker run --rm -it th - *ev* is not available in PHP 8.1+ - *mcrypt* is deprecated and its usage is discouraged: it is provided for legacy applications only +- *imagick* supports SVG, WMF, DjVu and OpenEXR images in addition to the common formats. If you process + untrusted images, you can restrict the allowed formats in the ImageMagick policy (`/etc/ImageMagick-6/policy.xml`) - The extensions required by an enabled extension are enabled with it, even if they are disabled: `igbinary` and `msgpack` for *memcached*, `igbinary` for *redis*, `mbstring` for *mailparse*, `curl` and `mysqlnd` for *swoole*, `mysqlnd` for *mysqli* and *pdo_mysql* ### Enabling/disabling extensions in the fat image diff --git a/extensions/8.2/opentelemetry b/extensions/8.2/opentelemetry new file mode 120000 index 00000000..83446fe2 --- /dev/null +++ b/extensions/8.2/opentelemetry @@ -0,0 +1 @@ +../core/opentelemetry \ No newline at end of file diff --git a/extensions/8.3/opentelemetry b/extensions/8.3/opentelemetry new file mode 120000 index 00000000..83446fe2 --- /dev/null +++ b/extensions/8.3/opentelemetry @@ -0,0 +1 @@ +../core/opentelemetry \ No newline at end of file diff --git a/extensions/8.4/opentelemetry b/extensions/8.4/opentelemetry new file mode 120000 index 00000000..83446fe2 --- /dev/null +++ b/extensions/8.4/opentelemetry @@ -0,0 +1 @@ +../core/opentelemetry \ No newline at end of file diff --git a/extensions/8.5/opentelemetry b/extensions/8.5/opentelemetry new file mode 120000 index 00000000..83446fe2 --- /dev/null +++ b/extensions/8.5/opentelemetry @@ -0,0 +1 @@ +../core/opentelemetry \ No newline at end of file diff --git a/extensions/core/imagick/install.sh b/extensions/core/imagick/install.sh index 14e2c50a..423026cd 100755 --- a/extensions/core/imagick/install.sh +++ b/extensions/core/imagick/install.sh @@ -2,5 +2,6 @@ set -e export EXTENSION=imagick +export DEPENDENCIES="libmagickcore-6.q16-7-extra" ../docker-install.sh diff --git a/extensions/core/opentelemetry/install.sh b/extensions/core/opentelemetry/install.sh new file mode 100755 index 00000000..8a60262d --- /dev/null +++ b/extensions/core/opentelemetry/install.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -e +export EXTENSION=opentelemetry + +../docker-install.sh diff --git a/tests-suite/php-extensions.sh b/tests-suite/php-extensions.sh index a6f56b13..965b2847 100755 --- a/tests-suite/php-extensions.sh +++ b/tests-suite/php-extensions.sh @@ -25,6 +25,14 @@ test_presenceOfUploadprogressOnFat() { assert_equals "uploadprogress" "${RESULT}" "Missing php-uploadprogress" } ################################################################### +## Let's check that Imagick can read SVG images on fat +################################################################### +test_imagickSvgOnFat() { + RESULT=$(docker run ${RUN_OPTIONS} -e "PHP_EXTENSIONS=imagick" --rm "${REPO}:${TAG_PREFIX}${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}${ARCH_SUFFIX}" \ + php -r 'echo in_array("SVG", Imagick::queryFormats(), true) ? "SVG" : "missing";' 2>&1) + assert_equals "SVG" "${RESULT}" "Imagick cannot read SVG images" +} +################################################################### ## Let's check that FFI is enabled explicitly with fat for PHP 7.4+ ################################################################### test_presenceOfFFIOnFat() { @@ -39,7 +47,7 @@ test_presenceOfPhp82ExtensionsOnFat() { # Only available on PHP 8.2+ if [[ "$(printf '%s\n' "$PHP_VERSION" "8.2" | sort -V | head -n 1)" != "8.2" ]]; then return 0; fi # Extension name in PHP_EXTENSIONS => name displayed by "php -m" - declare -A EXTENSIONS=([gnupg]=gnupg [mcrypt]=mcrypt [odbc]=odbc [pdo_odbc]=PDO_ODBC [zstd]=zstd [lz4]=lz4 [decimal]=decimal [inotify]=inotify) + declare -A EXTENSIONS=([gnupg]=gnupg [mcrypt]=mcrypt [odbc]=odbc [pdo_odbc]=PDO_ODBC [zstd]=zstd [lz4]=lz4 [decimal]=decimal [inotify]=inotify [opentelemetry]=opentelemetry) MODULES=$(docker run ${RUN_OPTIONS} -e "PHP_EXTENSIONS=${!EXTENSIONS[*]}" --rm "${REPO}:${TAG_PREFIX}${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}${ARCH_SUFFIX}" php -m | tail -n +1) for EXTENSION in "${!EXTENSIONS[@]}"; do RESULT=$(echo "${MODULES}" | grep --color=never -x "${EXTENSIONS[$EXTENSION]}") diff --git a/utils/README.blueprint.md b/utils/README.blueprint.md index ac6f54c3..67c628d8 100644 --- a/utils/README.blueprint.md +++ b/utils/README.blueprint.md @@ -118,7 +118,7 @@ Below is a list of extensions available in this image: **Enabled by default (in addition to extensions enabled in Slim image):** `apcu`, `hash`, `iconv`, `igbinary`, `mysqli`, `mysqlnd`, `redis`, `soap`, `xsl`, `zlib` and all enabled in slim. -**Available (can be enabled using environment variables):** `amqp` `ast` `bcmath` `blackfire` `bz2` `dba` `decimal` `ds` `enchant` `exif` `excimer` `ffi` `mailparse` `msgpack` `gd` `gettext` `gmp` `gnupg` `grpc` `igbinary` `imagick` `imap` `inotify` `intl` `ldap` `lz4` `mcrypt` `memcached` `mongodb` `odbc` `pcov` `pdo_dblib` `pdo_odbc` `pdo_pgsql` `pdo_sqlite` `pgsql` `pspell` `rdkafka` `shmop` `snmp` `sockets` `sqlite3` `swoole` `tidy` `uploadprogress` `uuid` `xdebug` `xmlrpc` `xsl` `yaml` `zstd` +**Available (can be enabled using environment variables):** `amqp` `ast` `bcmath` `blackfire` `bz2` `dba` `decimal` `ds` `enchant` `exif` `excimer` `ffi` `mailparse` `msgpack` `gd` `gettext` `gmp` `gnupg` `grpc` `igbinary` `imagick` `imap` `inotify` `intl` `ldap` `lz4` `mcrypt` `memcached` `mongodb` `odbc` `opentelemetry` `pcov` `pdo_dblib` `pdo_odbc` `pdo_pgsql` `pdo_sqlite` `pgsql` `pspell` `rdkafka` `shmop` `snmp` `sockets` `sqlite3` `swoole` `tidy` `uploadprogress` `uuid` `xdebug` `xmlrpc` `xsl` `yaml` `zstd` This list can be outdated, you can verify by executing : `docker run --rm -it thecodingmachine/php:{{ $image.php_version }}-v5-cli php -m` @@ -126,6 +126,8 @@ This list can be outdated, you can verify by executing : `docker run --rm -it th - *ev* is not available in PHP 8.1+ - *mcrypt* is deprecated and its usage is discouraged: it is provided for legacy applications only +- *imagick* supports SVG, WMF, DjVu and OpenEXR images in addition to the common formats. If you process + untrusted images, you can restrict the allowed formats in the ImageMagick policy (`/etc/ImageMagick-6/policy.xml`) - The extensions required by an enabled extension are enabled with it, even if they are disabled: `igbinary` and `msgpack` for *memcached*, `igbinary` for *redis*, `mbstring` for *mailparse*, `curl` and `mysqlnd` for *swoole*, `mysqlnd` for *mysqli* and *pdo_mysql* ### Enabling/disabling extensions in the fat image