Merge pull request #1565 from bestlong/fix-php5-xdebug

fix #1535 xdebug installation fails when php version is 5.6
This commit is contained in:
Shao Yu-Lung (Allen) 2018-05-26 07:40:15 +08:00 committed by GitHub
commit 8158b6f50e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -86,7 +86,11 @@ ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension # Install the xdebug extension
pecl install xdebug && \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install xdebug-2.5.5; \
else \
pecl install xdebug; \
fi && \
docker-php-ext-enable xdebug \ docker-php-ext-enable xdebug \
;fi ;fi