From e8dbb0e0f19933e9b00d2cc02cc74c3345273d65 Mon Sep 17 00:00:00 2001 From: Gino Pane Date: Tue, 25 Feb 2020 22:26:03 +0300 Subject: [PATCH] Fix #2506 Updates: - AST extension is no longer installed for unsupported PHP versions --- workspace/Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 07c99ad1..48d9ebc0 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -585,10 +585,13 @@ ARG AST_VERSION=1.0.3 ENV AST_VERSION ${AST_VERSION} RUN if [ ${INSTALL_AST} = true ]; then \ - # Install AST extension - printf "\n" | pecl -q install ast-${AST_VERSION} && \ - echo "extension=ast.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/ast.ini && \ - phpenmod -v ${LARADOCK_PHP_VERSION} -s cli ast \ + # AST extension requires PHP 7.0.0 or newer + if [ $(php -r "echo PHP_MAJOR_VERSION;") != "5" ]; then \ + # Install AST extension + printf "\n" | pecl -q install ast-${AST_VERSION} && \ + echo "extension=ast.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/ast.ini && \ + phpenmod -v ${LARADOCK_PHP_VERSION} -s cli ast \ + ;fi \ ;fi ###########################################################################