From 14e886a16ffe18d6a8f57daadd26cc1d397ab7df Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Wed, 9 Oct 2019 14:07:20 +0200 Subject: [PATCH] Add support for SSH2 on PHP 7.3 See also https://bugs.php.net/bug.php?id=78560 --- data/supported-extensions | 2 +- install-php-extensions | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/data/supported-extensions b/data/supported-extensions index 77c20f5..e6e2384 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -42,7 +42,7 @@ soap 5.6 7.0 7.1 7.2 7.3 sockets 5.6 7.0 7.1 7.2 7.3 solr 5.6 7.0 7.1 sqlsrv 7.0 7.1 7.2 7.3 -ssh2 5.6 7.0 7.1 7.2 +ssh2 5.6 7.0 7.1 7.2 7.3 sybase_ct 5.6 sysvmsg 5.6 7.0 7.1 7.2 7.3 sysvsem 5.6 7.0 7.1 7.2 7.3 diff --git a/install-php-extensions b/install-php-extensions index f19b6db..f689c07 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -423,6 +423,7 @@ installModuleFromSource () { installPECLModule () { printf '### INSTALLING PECL MODULE %s ###\n' "${2}" installPECLModule_actual="${2}" + installPECLModule_stdin='' case "${2}" in mcrypt) if test $1 -ge 702; then @@ -451,8 +452,13 @@ installPECLModule () { fi ;; ssh2) - if test $1 -ge 700; then - installPECLModule_actual="${2}-1.1.2" + if test $1 -le 506; then + installPECLModule_stdin='autodetect' + installPECLModule_actual="${2}-0.13" + else + installPECLModule_stdin='autodetect' + # see https://bugs.php.net/bug.php?id=78560 + installPECLModule_actual='https://pecl.php.net/get/ssh2' fi ;; xdebug) @@ -482,7 +488,11 @@ installPECLModule () { if test "${2}" != "${installPECLModule_actual}"; then printf ' (installing version %s)\n' "${installPECLModule_actual}" fi - pecl install "${installPECLModule_actual}" + if test -z "$installPECLModule_stdin"; then + pecl install "${installPECLModule_actual}" + else + printf '%s\n' "$installPECLModule_stdin" | pecl install "${installPECLModule_actual}" + fi docker-php-ext-enable "${2}" }