From 883a897420007d5202615c30f968763d1ff5e4d8 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 21 Nov 2019 15:56:49 +0100 Subject: [PATCH 1/5] Add enchant to 7.4 and 8.0 --- Dockerfiles/mods/Dockerfile-7.4 | 12 ++++++++ Dockerfiles/mods/Dockerfile-8.0 | 12 ++++++++ README.md | 4 +-- build/ansible/group_vars/all/mods.yml | 1 - tests/mods/modules/enchant/enchant-aspell.php | 30 +++++++++++++++++++ tests/mods/modules/enchant/enchant-hspell.php | 30 +++++++++++++++++++ tests/mods/modules/enchant/enchant-ispell.php | 30 +++++++++++++++++++ .../mods/modules/enchant/enchant-myspell.php | 30 +++++++++++++++++++ 8 files changed, 146 insertions(+), 3 deletions(-) create mode 100644 tests/mods/modules/enchant/enchant-aspell.php create mode 100644 tests/mods/modules/enchant/enchant-hspell.php create mode 100644 tests/mods/modules/enchant/enchant-ispell.php create mode 100644 tests/mods/modules/enchant/enchant-myspell.php diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index 3985c845..3bb249b7 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -15,6 +15,7 @@ RUN set -eux \ freetds-dev \ libaio-dev \ libbz2-dev \ + libenchant-dev \ libevent-dev \ libfbclient2 \ libffi-dev \ @@ -107,6 +108,14 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + # -------------------- Installing PHP Extension: exif -------------------- RUN set -eux \ # Installation: Generic @@ -625,6 +634,7 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ + libenchant1c2a \ libfbclient2 \ libffi6 \ libfreetype6 \ @@ -701,6 +711,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^dba$' \ && php -m | grep -oiE '^dom$' \ && php-fpm -m | grep -oiE '^dom$' \ + && php -m | grep -oiE '^enchant$' \ + && php-fpm -m | grep -oiE '^enchant$' \ && php -m | grep -oiE '^exif$' \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^ffi$' \ diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index 4cfaf0b6..183921dc 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -14,6 +14,7 @@ RUN set -eux \ freetds-dev \ libaio-dev \ libbz2-dev \ + libenchant-dev \ libevent-dev \ libfbclient2 \ libfreetype6-dev \ @@ -89,6 +90,14 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + # -------------------- Installing PHP Extension: exif -------------------- RUN set -eux \ # Installation: Generic @@ -560,6 +569,7 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ + libenchant1c2a \ libfbclient2 \ libffi6 \ libfreetype6 \ @@ -628,6 +638,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^dba$' \ && php -m | grep -oiE '^dom$' \ && php-fpm -m | grep -oiE '^dom$' \ + && php -m | grep -oiE '^enchant$' \ + && php-fpm -m | grep -oiE '^enchant$' \ && php -m | grep -oiE '^exif$' \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^ffi$' \ diff --git a/README.md b/README.md index 936a2ede..bb647372 100644 --- a/README.md +++ b/README.md @@ -647,12 +647,12 @@ Check out this table to see which Docker image provides what PHP modules. 7.4 Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, intl, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + amqp, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, intl, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 8.0 Core, ctype, curl, date, dom, FFI, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index 333fe81f..73b5acdd 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -206,7 +206,6 @@ extensions_available: dom: already_avail: "{{ php_all_versions }}" enchant: - disabled: [7.4, 8.0] # TODO: re-enable 5.2: type: pecl command: echo "/usr" | pecl install enchant diff --git a/tests/mods/modules/enchant/enchant-aspell.php b/tests/mods/modules/enchant/enchant-aspell.php new file mode 100644 index 00000000..5ed7cd50 --- /dev/null +++ b/tests/mods/modules/enchant/enchant-aspell.php @@ -0,0 +1,30 @@ + Date: Thu, 21 Nov 2019 16:05:03 +0100 Subject: [PATCH 2/5] Add enchant to 7.3 --- Dockerfiles/mods/Dockerfile-7.3 | 17 +++++++++++++++++ README.md | 2 +- build/ansible/group_vars/all/mods.yml | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index 4d374917..d7992d0d 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -70,6 +70,23 @@ RUN set -eux \ echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ fi +# -------------------- Installing PHP Extension: ioncube -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ +&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ +&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ +&& tar xvfz ioncube.tar.gz \ +&& cd ioncube \ +&& cp "ioncube_loader_lin_7.3.so" "${EXTENSION_DIR}/ioncube.so" \ +&& cd ../ \ +&& rm -rf ioncube \ +&& rm -rf ioncube.tar.gz \ + \ + && true + + # -------------------- Installing PHP Extension: amqp -------------------- RUN set -eux \ # Installation: Generic diff --git a/README.md b/README.md index bb647372..065c4ec6 100644 --- a/README.md +++ b/README.md @@ -642,7 +642,7 @@ Check out this table to see which Docker image provides what PHP modules. 7.3 Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 7.4 diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index 73b5acdd..8585945a 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -362,7 +362,7 @@ extensions_available: build_dep: [libc-client-dev, libkrb5-dev, libcurl4-openssl-dev] run_dep: [libc-client2007e] interbase: - disabled: [7.4, 8.0] # TODO: re-enable. currently not available anymore on 7.4 and 8.0 + disabled: [7.4, 8.0] all: type: builtin build_dep: [libfbclient2, libib-util, firebird-dev] @@ -397,7 +397,7 @@ extensions_available: build_dep: [libicu-dev] run_dep: [libicu63] ioncube: - disabled: [7.3, 7.4, 8.0] + disabled: [7.4, 8.0] all: type: custom command: | From c360bec7037441aa4202d824a59766f686da290e Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 21 Nov 2019 17:22:22 +0100 Subject: [PATCH 3/5] Update phalcon module --- Dockerfiles/mods/Dockerfile-5.5 | 2 +- Dockerfiles/mods/Dockerfile-5.6 | 2 +- Dockerfiles/mods/Dockerfile-7.0 | 2 +- Dockerfiles/mods/Dockerfile-7.1 | 2 +- Dockerfiles/mods/Dockerfile-7.4 | 17 +++++++++++++++++ build/ansible/group_vars/all/mods.yml | 10 +++++----- 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index 965a0096..3e621b07 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -422,7 +422,7 @@ RUN set -eux \ && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ # Custom: Branch - && git checkout v3.4.2 \ + && git checkout v3.4.4 \ # Custom: Install command && cd build && ./install \ # Enabling diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index 9f4d5844..f3cbc0cd 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -451,7 +451,7 @@ RUN set -eux \ && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ # Custom: Branch - && git checkout v3.4.2 \ + && git checkout v3.4.4 \ # Custom: Install command && cd build && ./install \ # Enabling diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index 72279a7e..e486da78 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -476,7 +476,7 @@ RUN set -eux \ && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ # Custom: Branch - && git checkout v3.4.2 \ + && git checkout v3.4.4 \ # Custom: Install command && cd build && ./install \ # Enabling diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index 2803c892..dd084c8f 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -475,7 +475,7 @@ RUN set -eux \ && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ # Custom: Branch - && git checkout v3.4.2 \ + && git checkout v3.4.4 \ # Custom: Install command && cd build && ./install \ # Enabling diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index 3bb249b7..14b2ca54 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -389,6 +389,21 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: phalcon -------------------- +RUN set -eux \ + # Installation: Generic + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep -E '^v[.0-9]+$' | tail -1) \ + # Custom: Install command + && cd build && ./install \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + # -------------------- Installing PHP Extension: pspell -------------------- RUN set -eux \ # Installation: Generic @@ -785,6 +800,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^pdo_sqlite$' \ && php -m | grep -oiE '^pgsql$' \ && php-fpm -m | grep -oiE '^pgsql$' \ + && php -m | grep -oiE '^phalcon$' \ + && php-fpm -m | grep -oiE '^phalcon$' \ && php -m | grep -oiE '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \ && php -m | grep -oiE '^posix$' \ diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index 8585945a..6fee6de3 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -731,7 +731,7 @@ extensions_available: build_dep: [libpq-dev] run_dep: [libpq5] phalcon: - disabled: [5.2, 7.4, 8.0] # TODO: currently disabled for 7.4 as it breaks + disabled: [5.2, 8.0] # TODO: currently disabled for 7.4 as it breaks 5.3: type: git git_url: https://github.com/phalcon/cphalcon @@ -745,22 +745,22 @@ extensions_available: 5.5: type: git git_url: https://github.com/phalcon/cphalcon - git_ref: v3.4.2 + git_ref: v3.4.4 command: cd build && ./install 5.6: type: git git_url: https://github.com/phalcon/cphalcon - git_ref: v3.4.2 + git_ref: v3.4.4 command: cd build && ./install 7.0: type: git git_url: https://github.com/phalcon/cphalcon - git_ref: v3.4.2 + git_ref: v3.4.4 command: cd build && ./install 7.1: type: git git_url: https://github.com/phalcon/cphalcon - git_ref: v3.4.2 + git_ref: v3.4.4 command: cd build && ./install all: type: git From 0750ec93395c5605456585937e1febfcd51c0907 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 21 Nov 2019 17:22:36 +0100 Subject: [PATCH 4/5] imagick integration tests --- .../imagick/{imagick.php => imagick-png.php} | 5 +- tests/mods/modules/imagick/imagick-webp.php | 59 +++++++++++++++++++ 2 files changed, 61 insertions(+), 3 deletions(-) rename tests/mods/modules/imagick/{imagick.php => imagick-png.php} (94%) create mode 100644 tests/mods/modules/imagick/imagick-webp.php diff --git a/tests/mods/modules/imagick/imagick.php b/tests/mods/modules/imagick/imagick-png.php similarity index 94% rename from tests/mods/modules/imagick/imagick.php rename to tests/mods/modules/imagick/imagick-png.php index c40ead04..cdc3b04e 100644 --- a/tests/mods/modules/imagick/imagick.php +++ b/tests/mods/modules/imagick/imagick-png.php @@ -27,7 +27,7 @@ $img = new Imagick(); if ($img->newImage($width, $height, new ImagickPixel('transparent')) !== TRUE) { - echo 'FAIL: imagecreatetruecolor()'; + echo 'FAIL: newImage()'; exit(1); } @@ -44,9 +44,8 @@ $draw->setFillColor('black'); if ($img->setImageFormat('png') !== TRUE) { - echo 'FAIL: imagecreatetruecolor()'; + echo 'FAIL: setImageFormat()'; exit(1); } - echo 'OK'; diff --git a/tests/mods/modules/imagick/imagick-webp.php b/tests/mods/modules/imagick/imagick-webp.php new file mode 100644 index 00000000..825e0b06 --- /dev/null +++ b/tests/mods/modules/imagick/imagick-webp.php @@ -0,0 +1,59 @@ +=')) { + echo 'OK'; + exit(0); +} + +/* Set width and height in proportion of genuine PHP logo */ +$width = 400; +$height = 210; + +/* Create an Imagick object with transparent canvas */ +$img = new Imagick(); + +if ($img->newImage($width, $height, new ImagickPixel('transparent')) !== TRUE) { + echo 'FAIL: newImage()'; + exit(1); +} + +/* New ImagickDraw instance for ellipse draw */ +$draw = new ImagickDraw(); +/* Set purple fill color for ellipse */ +$draw->setFillColor('#777bb4'); +/* Set ellipse dimensions */ +$draw->ellipse($width / 2, $height / 2, $width / 2, $height / 2, 0, 360); +/* Draw ellipse onto the canvas */ +$img->drawImage($draw); + +/* Reset fill color from purple to black for text (note: we are reusing ImagickDraw object) */ +$draw->setFillColor('black'); + +if ($img->setImageFormat('webp') !== TRUE) { + echo 'FAIL: setImageFormat()'; + exit(1); +} +if ($img->setImageAlphaChannel(imagick::ALPHACHANNEL_ACTIVATE) !== TRUE) { + echo 'FAIL: setImageAlphaChannel()'; + exit(1); +} +if ($img->setBackgroundColor(new ImagickPixel('transparent')) !== TRUE) { + echo 'FAIL: setBackgroundColor()'; + exit(1); +} + +echo 'OK'; From dc7336fa3df61856d3dee4739b862ef681f2c347 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 21 Nov 2019 17:27:47 +0100 Subject: [PATCH 5/5] Show tests that are skipped --- Dockerfiles/mods/Dockerfile-5.6 | 1 + Dockerfiles/mods/Dockerfile-7.0 | 1 + Dockerfiles/mods/Dockerfile-7.1 | 2 + Dockerfiles/mods/Dockerfile-7.2 | 2 + Dockerfiles/mods/Dockerfile-7.3 | 2 + Dockerfiles/mods/Dockerfile-7.4 | 41 +++++---------- Dockerfiles/mods/Dockerfile-8.0 | 12 ++--- Dockerfiles/work/Dockerfile-7.4 | 4 +- Dockerfiles/work/Dockerfile-8.0 | 4 +- build/ansible/DOCKERFILES/Dockerfile-work.j2 | 2 +- build/ansible/group_vars/all/mods.yml | 40 ++++----------- build/ansible/group_vars/all/work.yml | 16 ++++++ tests/mods/modules.sh | 2 +- tests/mods/modules/gd/gd-webp.php | 2 +- tests/mods/modules/imagick/imagick-jpeg.php | 52 ++++++++++++++++++++ tests/mods/modules/imagick/imagick-png.php | 9 ++-- tests/mods/modules/imagick/imagick-webp.php | 11 +++-- 17 files changed, 121 insertions(+), 82 deletions(-) create mode 100644 tests/mods/modules/imagick/imagick-jpeg.php diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index f3cbc0cd..238ce424 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -43,6 +43,7 @@ RUN set -eux \ libtidy-dev \ libvpx-dev \ libwebp-dev \ + libwebp6 \ libxml2-dev \ libxpm-dev \ libxslt-dev \ diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index e486da78..074b1fa2 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -43,6 +43,7 @@ RUN set -eux \ libtidy-dev \ libvpx-dev \ libwebp-dev \ + libwebp6 \ libxml2-dev \ libxpm-dev \ libxslt-dev \ diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index dd084c8f..3f7a956e 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -43,6 +43,7 @@ RUN set -eux \ libtidy-dev \ libvpx-dev \ libwebp-dev \ + libwebp6 \ libxml2-dev \ libxpm-dev \ libxslt-dev \ @@ -752,6 +753,7 @@ RUN set -eux \ libsybdb5 \ libtidy5deb1 \ libvpx5 \ + libwebp-dev \ libwebp6 \ libxpm4 \ libxslt1.1 \ diff --git a/Dockerfiles/mods/Dockerfile-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index 3eebfded..09ecbc4b 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -43,6 +43,7 @@ RUN set -eux \ libtidy-dev \ libvpx-dev \ libwebp-dev \ + libwebp6 \ libxml2-dev \ libxpm-dev \ libxslt-dev \ @@ -756,6 +757,7 @@ RUN set -eux \ libsybdb5 \ libtidy5deb1 \ libvpx5 \ + libwebp-dev \ libwebp6 \ libxpm4 \ libxslt1.1 \ diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index d7992d0d..9217db26 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -45,6 +45,7 @@ RUN set -eux \ libtidy-dev \ libvpx-dev \ libwebp-dev \ + libwebp6 \ libxml2-dev \ libxpm-dev \ libxslt-dev \ @@ -754,6 +755,7 @@ RUN set -eux \ libsybdb5 \ libtidy5deb1 \ libvpx5 \ + libwebp-dev \ libwebp6 \ libxpm4 \ libxslt1.1 \ diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index 14b2ca54..a4df71c5 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -41,6 +41,7 @@ RUN set -eux \ libtidy-dev \ libvpx-dev \ libwebp-dev \ + libwebp6 \ libxml2-dev \ libxpm-dev \ libxslt-dev \ @@ -185,7 +186,7 @@ RUN set -eux \ # -------------------- Installing PHP Extension: imagick -------------------- RUN set -eux \ - # Installation: Version specific + # Installation: Generic # Type: PECL extension # Default: Pecl command && pecl install imagick \ @@ -196,9 +197,8 @@ RUN set -eux \ # -------------------- Installing PHP Extension: intl -------------------- RUN set -eux \ - # Installation: Version specific + # Installation: Generic # Type: Built-in extension - # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ && true @@ -389,21 +389,6 @@ RUN set -eux \ && true -# -------------------- Installing PHP Extension: phalcon -------------------- -RUN set -eux \ - # Installation: Generic - # Type: GIT extension - && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ - && cd /tmp/phalcon \ - # Custom: Branch - && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep -E '^v[.0-9]+$' | tail -1) \ - # Custom: Install command - && cd build && ./install \ - # Enabling - && docker-php-ext-enable phalcon \ - && true - - # -------------------- Installing PHP Extension: pspell -------------------- RUN set -eux \ # Installation: Generic @@ -434,10 +419,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: rdkafka -------------------- RUN set -eux \ - # Installation: Version specific + # Installation: Generic # Type: PECL extension # Default: Pecl command - && pecl install rdkafka-3.1.2 \ + && pecl install rdkafka \ # Enabling && docker-php-ext-enable rdkafka \ && true @@ -529,9 +514,8 @@ RUN set -eux \ # -------------------- Installing PHP Extension: tidy -------------------- RUN set -eux \ - # Installation: Version specific + # Installation: Generic # Type: Built-in extension - # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ && true @@ -653,10 +637,10 @@ RUN set -eux \ libfbclient2 \ libffi6 \ libfreetype6 \ - libhiredis0.13 \ - libicu57 \ + libhiredis0.14 \ + libicu63 \ libjpeg62-turbo \ - libmagickwand-6.q16-3 \ + libmagickwand-6.q16-6 \ libmcrypt4 \ libmemcachedutil2 \ libnghttp2-14 \ @@ -665,8 +649,9 @@ RUN set -eux \ librabbitmq4 \ librdkafka1 \ libsybdb5 \ - libtidy5 \ - libvpx4 \ + libtidy5deb1 \ + libvpx5 \ + libwebp-dev \ libwebp6 \ libxpm4 \ libxslt1.1 \ @@ -800,8 +785,6 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^pdo_sqlite$' \ && php -m | grep -oiE '^pgsql$' \ && php-fpm -m | grep -oiE '^pgsql$' \ - && php -m | grep -oiE '^phalcon$' \ - && php-fpm -m | grep -oiE '^phalcon$' \ && php -m | grep -oiE '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \ && php -m | grep -oiE '^posix$' \ diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index 183921dc..bd97b18b 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -139,9 +139,8 @@ RUN set -eux \ # -------------------- Installing PHP Extension: intl -------------------- RUN set -eux \ - # Installation: Version specific + # Installation: Generic # Type: Built-in extension - # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ && true @@ -453,9 +452,8 @@ RUN set -eux \ # -------------------- Installing PHP Extension: tidy -------------------- RUN set -eux \ - # Installation: Version specific + # Installation: Generic # Type: Built-in extension - # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ && true @@ -573,14 +571,14 @@ RUN set -eux \ libfbclient2 \ libffi6 \ libfreetype6 \ - libicu57 \ + libicu63 \ libjpeg62-turbo \ libmemcachedutil2 \ libpng16-16 \ libpq5 \ libsybdb5 \ - libtidy5 \ - libvpx4 \ + libtidy5deb1 \ + libvpx5 \ libwebp6 \ libxpm4 \ libxslt1.1 \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index 4a214e0a..98c9cdda 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -87,7 +87,7 @@ RUN set -eux \ mongodb-org-shell \ mongodb-org-tools \ moreutils \ - mysql-client \ + mariadb-client \ nano \ net-tools \ netcat \ @@ -305,7 +305,7 @@ RUN set -eux \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ + libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index 0010e102..e10f1ec0 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -87,7 +87,7 @@ RUN set -eux \ mongodb-org-shell \ mongodb-org-tools \ moreutils \ - mysql-client \ + mariadb-client \ nano \ net-tools \ netcat \ @@ -243,7 +243,7 @@ RUN set -eux \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ + libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index 9575f7ef..cad4dbb2 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -101,7 +101,7 @@ RUN set -eux \ mongodb-org-shell \ mongodb-org-tools \ moreutils \ -{% if php_version in [7.1, 7.2, 7.3] %} +{% if php_version in [7.1, 7.2, 7.3, 7.4, 8.0] %} mariadb-client \ {% else %} mysql-client \ diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index 6fee6de3..efe82d4d 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -295,11 +295,9 @@ extensions_available: 7.4: type: builtin configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv - run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] 8.0: type: builtin configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv - run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] all: type: builtin pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ @@ -342,17 +340,14 @@ extensions_available: disabled: [5.2, 5.3, 5.4, 5.5, 8.0] # 5.3, 5.4 and 5.5 segfaults 5.6: type: pecl - run_dep: [libmagickwand-6.q16-3] + run_dep: [libmagickwand-6.q16-3, libwebp6] 7.0: type: pecl - run_dep: [libmagickwand-6.q16-3] - 7.4: - type: pecl - run_dep: [libmagickwand-6.q16-3] + run_dep: [libmagickwand-6.q16-3, libwebp6] all: type: pecl - build_dep: [libmagickwand-dev] - run_dep: [libmagickwand-6.q16-6] + build_dep: [libmagickwand-dev, libwebp6] + run_dep: [libmagickwand-6.q16-6, libwebp-dev] imap: disabled: [7.4, 8.0] # TODO: re-enable. currently fails with: configure: error: OpenSSL libraries not found. all: @@ -386,12 +381,6 @@ extensions_available: 7.0: type: builtin run_dep: [libicu57] - 7.4: - type: builtin - run_dep: [libicu57] - 8.0: - type: builtin - run_dep: [libicu57] all: type: builtin build_dep: [libicu-dev] @@ -674,16 +663,16 @@ extensions_available: build_dep: [zlib1g-dev] pdo_oci: disabled: [5.2, 5.3, 5.4, 5.5, 5.6] - 8.0: + 7.2: type: builtin configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} - 7.4: + 7.3: type: builtin configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} - 7.3: + 7.4: type: builtin configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} - 7.2: + 8.0: type: builtin configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} all: @@ -731,7 +720,7 @@ extensions_available: build_dep: [libpq-dev] run_dep: [libpq5] phalcon: - disabled: [5.2, 8.0] # TODO: currently disabled for 7.4 as it breaks + disabled: [5.2, 7.4, 8.0] # TODO: currently disabled for 7.4 as it breaks 5.3: type: git git_url: https://github.com/phalcon/cphalcon @@ -856,9 +845,6 @@ extensions_available: 7.0: type: pecl version: 3.1.2 - 7.4: - type: pecl - version: 3.1.2 all: type: pecl build_dep: [librdkafka-dev] @@ -954,7 +940,7 @@ extensions_available: --enable-coroutine-postgresql \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ - run_dep: [libnghttp2-14, libhiredis0.13] + run_dep: [libnghttp2-14, libhiredis0.14] build_dep: [libnghttp2-dev, libssl-dev, libhiredis-dev, libpq-dev, cmake] all: type: pecl @@ -988,12 +974,6 @@ extensions_available: 7.0: type: builtin run_dep: [libtidy5] - 7.4: - type: builtin - run_dep: [libtidy5] - 8.0: - type: builtin - run_dep: [libtidy5] all: type: builtin build_dep: [libtidy-dev] diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index 836b4ca0..e7cbac2a 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -727,6 +727,22 @@ software_available: && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ + 7.4: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ + && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ + && dpkg -i /tmp/wkhtmltopdf.deb \ + && rm -f /tmp/wkhtmltopdf.deb \ + 8.0: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ + && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ + && dpkg -i /tmp/wkhtmltopdf.deb \ + && rm -f /tmp/wkhtmltopdf.deb \ all: pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" command: | diff --git a/tests/mods/modules.sh b/tests/mods/modules.sh index b2935763..1efa79be 100755 --- a/tests/mods/modules.sh +++ b/tests/mods/modules.sh @@ -64,7 +64,7 @@ docker run \ if script -e -c \"php \${1}\" /dev/null 2>&1 | grep -Ei \"core|segmentation|fatal|except|err|warn|notice\" 2>&1 >/dev/null; then fail=1 fi - if ! php \"\${1}\" 2>&1 | grep -E \"^OK$\" 2>&1 >/dev/null; then + if ! php \"\${1}\" 2>&1 | grep -E \"^(OK|SKIP)$\" 2>&1 >/dev/null; then fail=1 fi diff --git a/tests/mods/modules/gd/gd-webp.php b/tests/mods/modules/gd/gd-webp.php index fa659641..5b88c7e1 100644 --- a/tests/mods/modules/gd/gd-webp.php +++ b/tests/mods/modules/gd/gd-webp.php @@ -10,7 +10,7 @@ // Only available since 5.4.0 if (version_compare(PHP_VERSION, '5.4.0', '<')) { - echo 'OK'; + echo 'SKIP'; exit(0); } diff --git a/tests/mods/modules/imagick/imagick-jpeg.php b/tests/mods/modules/imagick/imagick-jpeg.php new file mode 100644 index 00000000..aea7b798 --- /dev/null +++ b/tests/mods/modules/imagick/imagick-jpeg.php @@ -0,0 +1,52 @@ +=')) { + echo 'SKIP'; + exit(0); +} + +/* Set width and height in proportion of genuine PHP logo */ +$width = 400; +$height = 210; + +/* Create an Imagick object with transparent canvas */ +$img = new Imagick(); + +if ($img->newImage($width, $height, new ImagickPixel('transparent')) !== TRUE) { + echo 'FAIL: newImage()'; + exit(1); +} + +/* New ImagickDraw instance for ellipse draw */ +$draw = new ImagickDraw(); +/* Set purple fill color for ellipse */ +$draw->setFillColor('#777bb4'); +/* Set ellipse dimensions */ +$draw->ellipse($width / 2, $height / 2, $width / 2, $height / 2, 0, 360); +/* Draw ellipse onto the canvas */ +$img->drawImage($draw); + +/* Reset fill color from purple to black for text (note: we are reusing ImagickDraw object) */ +$draw->setFillColor('black'); + +if ($img->setImageFormat('jpeg') !== TRUE) { + echo 'FAIL: setImageFormat()'; + exit(1); +} + +echo 'OK'; diff --git a/tests/mods/modules/imagick/imagick-png.php b/tests/mods/modules/imagick/imagick-png.php index cdc3b04e..86956b2d 100644 --- a/tests/mods/modules/imagick/imagick-png.php +++ b/tests/mods/modules/imagick/imagick-png.php @@ -7,15 +7,16 @@ ini_set('display_errors', 1); error_reporting(-1); +$PHP_VERSION = str_replace('-dev', '', PHP_VERSION); // Only available since 5.3.0 (PHP 5.3, 5.4 and 5.5 segfaults) -if (version_compare(PHP_VERSION, '5.6.0', '<')) { - echo 'OK'; +if (version_compare($PHP_VERSION, '5.6.0', '<')) { + echo 'SKIP'; exit(0); } // FIXME: Currently not supported on PHP 8 -if (version_compare(PHP_VERSION, '5.8.0', '>=')) { - echo 'OK'; +if (version_compare($PHP_VERSION, '8.0.0', '>=')) { + echo 'SKIP'; exit(0); } diff --git a/tests/mods/modules/imagick/imagick-webp.php b/tests/mods/modules/imagick/imagick-webp.php index 825e0b06..9c16c453 100644 --- a/tests/mods/modules/imagick/imagick-webp.php +++ b/tests/mods/modules/imagick/imagick-webp.php @@ -7,15 +7,16 @@ ini_set('display_errors', 1); error_reporting(-1); +$PHP_VERSION = str_replace('-dev', '', PHP_VERSION); -// Only available since 5.3.0 (PHP 5.3, 5.4 and 5.5 segfaults) -if (version_compare(PHP_VERSION, '5.6.0', '<')) { - echo 'OK'; +// Web support only since 7.2+ +if (version_compare($PHP_VERSION, '7.1.0', '<=')) { + echo 'SKIP'; exit(0); } // FIXME: Currently not supported on PHP 8 -if (version_compare(PHP_VERSION, '5.8.0', '>=')) { - echo 'OK'; +if (version_compare($PHP_VERSION, '8.0.0', '>=')) { + echo 'SKIP'; exit(0); }