aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/setup-php-extensions.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh
index 918f67cd47..de27965e39 100755
--- a/travis/setup-php-extensions.sh
+++ b/travis/setup-php-extensions.sh
@@ -56,10 +56,13 @@ fi
# APCu
if [ `php -r "echo (int) (version_compare(PHP_VERSION, '7.0.0-dev', '>=') && version_compare(PHP_VERSION, '7.3.0-dev', '<'));"` == "1" ]
then
- echo 'Enabling APCu PHP extension'
- printf "\n" | pecl install apcu
- echo 'apc.enabled=1' >> "$php_ini_file"
- echo 'apc.enable_cli=1' >> "$php_ini_file"
+ if ! [ "$(pecl info pecl/apcu)" ]
+ then
+ echo 'Enabling APCu PHP extension'
+ printf "\n" | pecl install apcu
+ echo 'apc.enabled=1' >> "$php_ini_file"
+ echo 'apc.enable_cli=1' >> "$php_ini_file"
+ fi
fi