Merge pull request #49 from mlocati/redis-igbinary

Enable igbinary support for redis
pull/50/head
Michele Locati 2019-10-11 11:04:38 +02:00 committed by GitHub
commit c039245593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 13 deletions

View File

@ -423,18 +423,13 @@ installModuleFromSource () {
installPECLModule () { installPECLModule () {
printf '### INSTALLING PECL MODULE %s ###\n' "${2}" printf '### INSTALLING PECL MODULE %s ###\n' "${2}"
installPECLModule_actual="${2}" installPECLModule_actual="${2}"
installPECLModule_stdin='' installPECLModule_stdin='\n'
case "${2}" in case "${2}" in
apcu) apcu)
if test $1 -le 506; then if test $1 -le 506; then
installPECLModule_actual="${2}-4.0.11" installPECLModule_actual="${2}-4.0.11"
fi fi
;; ;;
mcrypt)
if test $1 -ge 702; then
installPECLModule_stdin='autodetect'
fi
;;
memcached) memcached)
if test $1 -lt 700; then if test $1 -lt 700; then
installPECLModule_actual="${2}-2.2.0" installPECLModule_actual="${2}-2.2.0"
@ -467,6 +462,8 @@ installPECLModule () {
if test $1 -le 506; then if test $1 -le 506; then
installPECLModule_actual="${2}-4.3.0" installPECLModule_actual="${2}-4.3.0"
fi fi
# enable-redis-igbinary? enable-redis-lzf?
php --ri igbinary >/dev/null 2>/dev/null && installPECLModule_stdin='yes\nyes\n' || installPECLModule_stdin='no\nyes\n'
;; ;;
solr) solr)
if test $1 -le 506; then if test $1 -le 506; then
@ -475,10 +472,8 @@ installPECLModule () {
;; ;;
ssh2) ssh2)
if test $1 -le 506; then if test $1 -le 506; then
installPECLModule_stdin='autodetect'
installPECLModule_actual="${2}-0.13" installPECLModule_actual="${2}-0.13"
else else
installPECLModule_stdin='autodetect'
# see https://bugs.php.net/bug.php?id=78560 # see https://bugs.php.net/bug.php?id=78560
installPECLModule_actual='https://pecl.php.net/get/ssh2' installPECLModule_actual='https://pecl.php.net/get/ssh2'
fi fi
@ -512,11 +507,7 @@ installPECLModule () {
if test "${2}" != "${installPECLModule_actual}"; then if test "${2}" != "${installPECLModule_actual}"; then
printf ' (installing version %s)\n' "${installPECLModule_actual}" printf ' (installing version %s)\n' "${installPECLModule_actual}"
fi fi
if test -z "$installPECLModule_stdin"; then printf "${installPECLModule_stdin}" | pecl install "${installPECLModule_actual}"
pecl install "${installPECLModule_actual}"
else
printf '%s\n' "$installPECLModule_stdin" | pecl install "${installPECLModule_actual}"
fi
docker-php-ext-enable "${2}" docker-php-ext-enable "${2}"
} }