Merge pull request #3080 from VVVi/patch-1

Xdebug compatibilyti improvement
This commit is contained in:
Shao Yu-Lung (Allen) 2021-10-18 08:08:15 +08:00 committed by GitHub
commit 42e6f53bc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -219,8 +219,9 @@ ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
pecl install xdebug-3.0.0; \
# https://xdebug.org/docs/compat
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] || { [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && { [ $(php -r "echo PHP_MINOR_VERSION;") = "4" ] || [ $(php -r "echo PHP_MINOR_VERSION;") = "3" ] ;} ;}; then \
pecl install xdebug-3.1.1; \
else \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install xdebug-2.5.5; \