Add extension 'uri_template' for PHP versions < 7

This commit is contained in:
Christoph 2017-06-21 18:34:37 +02:00
parent 3c3d691e96
commit d8bd594f38

View File

@ -2077,6 +2077,34 @@ fi
## - END: Install redis
## -----
## -----
## - Install uri_template - !! only versions <= 5.6
## -----
echononl "\tInstall uri_template via pecl.."
if [[ $MAIN_VERSION -lt 7 ]] ; then
printf "\n" | ${PREFIX_PHP}/bin/pecl install uri_template > /dev/null 2>&1
if [ "$?" = "0" ]; then
echo_ok
echononl "\tphp.ini: extension=uri_template.so .."
_extension="uri_template.so"
perl -i -n -p -e "s#^(\s*\[PHP\]\s*)#\1\nextension=${_extension}\napc.enable_cli = 1\n#" $PHP_INI_FILE
if [ "$?" = "0" ]; then
echo_ok
else
echo_failed
fi
else
echo_failed
fi
else
echo_skipped
warn "Pecl extension 'uri_template' is only available for PHP versions < 7 - version 7 also excluded."
fi
## -----
## - Install APCu