diff --git a/README.md b/README.md index b566e41..1b769d0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repository contains a script that can be used to easily install a PHP exten The script will install all the required APT/APK packages; at the end of the script execution, the no-more needed packages will be removed so that the image will be much smaller. -The script works both for Alpine and Debian Linux. +Supported docker images are all the Alpine/Debian versions, except for PHP 5.5 where we only support Debian 8 (jessie) (that is, `php:5.5`, `php:5.5-apache`, `php:5.5-cli`, `php:5.5-fpm`, `php:5.5-zts`) ## Usage diff --git a/data/supported-extensions b/data/supported-extensions index 365665e..7b3610a 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -1,14 +1,14 @@ -amqp 5.6 7.0 7.1 7.2 7.3 7.4 -apcu 5.6 7.0 7.1 7.2 7.3 7.4 -bcmath 5.6 7.0 7.1 7.2 7.3 7.4 -bz2 5.6 7.0 7.1 7.2 7.3 7.4 -calendar 5.6 7.0 7.1 7.2 7.3 7.4 +amqp 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +apcu 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +bcmath 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +bz2 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +calendar 5.5 5.6 7.0 7.1 7.2 7.3 7.4 cmark 7.0 7.1 7.2 7.3 7.4 -dba 5.6 7.0 7.1 7.2 7.3 7.4 -enchant 5.6 7.0 7.1 7.2 7.3 7.4 -exif 5.6 7.0 7.1 7.2 7.3 7.4 -gd 5.6 7.0 7.1 7.2 7.3 7.4 -gettext 5.6 7.0 7.1 7.2 7.3 7.4 +dba 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +enchant 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +exif 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +gd 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +gettext 5.5 5.6 7.0 7.1 7.2 7.3 7.4 gmagick 5.6 7.0 7.1 7.2 7.3 7.4 gmp 5.6 7.0 7.1 7.2 7.3 7.4 grpc 5.6 7.0 7.1 7.2 7.3 7.4 diff --git a/install-php-extensions b/install-php-extensions index a0ebb61..8fbb8a2 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -645,6 +645,7 @@ buildRequiredPackageLists() { ;; debian) DEBIAN_FRONTEND=noninteractive apt-get update -q + DEBIAN_FRONTEND=noninteractive apt-get upgrade -qqy ;; esac if test -n "$buildRequiredPackageLists_persistent"; then @@ -1324,7 +1325,7 @@ mkdir -p /tmp/src IPE_ERRFLAG_FILE="$(mktemp -p /tmp/src)" PHP_MAJMIN_VERSION=$(getPHPMajorMinor) case "$PHP_MAJMIN_VERSION" in - 506 | 700 | 701 | 702 | 703 | 704) ;; + 505 | 506 | 700 | 701 | 702 | 703 | 704) ;; *) printf "### ERROR: Unsupported PHP version: %s.%s ###\n" $((PHP_MAJMIN_VERSION / 100)) $((PHP_MAJMIN_VERSION % 100)) ;; diff --git a/scripts/tests/gd.php b/scripts/tests/gd.php index 4f73b15..f7b562b 100644 --- a/scripts/tests/gd.php +++ b/scripts/tests/gd.php @@ -37,11 +37,20 @@ try { throw new Exception("{$saveFuntion}() function is missing"); } $tempFile = tempnam(sys_get_temp_dir(), 'dpei'); + ob_start(); if ($saveFuntion($image, $tempFile) === false) { throw new Exception("{$saveFuntion}() failed"); } - if (!is_file($tempFile) || filesize($tempFile) < 1) { - throw new Exception("{$saveFuntion}() created an empty file"); + $contents = ob_get_contents(); + ob_end_clean(); + if (!is_file($tempFile)) { + throw new Exception("{$saveFuntion}() didn't create a file"); + } + if (filesize($tempFile) < 1) { + if ($format !== 'xbm' || PHP_VERSION_ID >= 50600 || $contents === '') { + throw new Exception("{$saveFuntion}() created an empty file"); + } + file_put_contents($tempFile, $contents); } $image2 = $loadFuntion($tempFile); unlink($tempFile); diff --git a/scripts/travisci-test-extensions b/scripts/travisci-test-extensions index 23ea899..f2a56bf 100755 --- a/scripts/travisci-test-extensions +++ b/scripts/travisci-test-extensions @@ -39,6 +39,14 @@ getDockerImageName() { done fi getDockerImageName_imageName="$(printf 'php:%s-%s-%s' "$getDockerImageName_version" "$getDockerImageName_suffix" "$DOCKER_DISTRO")" + case "$getDockerImageName_imageName" in + php:5.5-cli-jessie) + getDockerImageName_imageName='php:5.5-cli' + ;; + php:5.5-zts-jessie) + getDockerImageName_imageName='php:5.5-zts' + ;; + esac if test -z "$(docker images -q "$getDockerImageName_imageName" 2>/dev/null)"; then getDockerImageName_log="$(docker pull "$getDockerImageName_imageName" 2>&1 || true)" if test -z "$(docker images -q "$getDockerImageName_imageName" 2>/dev/null)"; then