Skip to content

Commit 8158b6f

Browse files
authored
Merge pull request laradock#1565 from bestlong/fix-php5-xdebug
fix laradock#1535 xdebug installation fails when php version is 5.6
2 parents 6e6284d + 97adef7 commit 8158b6f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

php-fpm/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,13 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
8585
ARG INSTALL_XDEBUG=false
8686

8787
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
88-
# Install the xdebug extension
89-
pecl install xdebug && \
90-
docker-php-ext-enable xdebug \
88+
# Install the xdebug extension
89+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
90+
pecl install xdebug-2.5.5; \
91+
else \
92+
pecl install xdebug; \
93+
fi && \
94+
docker-php-ext-enable xdebug \
9195
;fi
9296

9397
# Copy xdebug configuration for remote debugging

0 commit comments

Comments
 (0)