Add support for SSH2 on PHP 7.3

See also https://bugs.php.net/bug.php?id=78560
pull/34/head
Michele Locati 2019-10-09 14:07:20 +02:00
parent 28e4e28cb9
commit 14e886a16f
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
2 changed files with 14 additions and 4 deletions

View File

@ -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

View File

@ -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}"
}