Fix #2506
Updates: - AST extension is no longer installed for unsupported PHP versions
This commit is contained in:
parent
33828f81bf
commit
e8dbb0e0f1
@ -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
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user