Updates:
- AST extension is no longer installed for unsupported PHP versions
This commit is contained in:
Gino Pane 2020-02-25 22:26:03 +03:00
parent 33828f81bf
commit e8dbb0e0f1
1 changed files with 7 additions and 4 deletions

View File

@ -585,10 +585,13 @@ ARG AST_VERSION=1.0.3
ENV AST_VERSION ${AST_VERSION} ENV AST_VERSION ${AST_VERSION}
RUN if [ ${INSTALL_AST} = true ]; then \ RUN if [ ${INSTALL_AST} = true ]; then \
# Install AST extension # AST extension requires PHP 7.0.0 or newer
printf "\n" | pecl -q install ast-${AST_VERSION} && \ if [ $(php -r "echo PHP_MAJOR_VERSION;") != "5" ]; then \
echo "extension=ast.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/ast.ini && \ # Install AST extension
phpenmod -v ${LARADOCK_PHP_VERSION} -s cli ast \ 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 ;fi
########################################################################### ###########################################################################