Skip to content

Commit a9ae446

Browse files
committed
Use alternate Xdebug installation method on PHP 5.6
Uses workaround detailed in github.com/docker-library/php/issues/133 to compile Xdebug from source with different args. Allows debugging of code involving static properties without errors.
1 parent c82a282 commit a9ae446

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

installer/stretch/extensions/xdebug.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,22 @@ function install_xdebug()
44
{
55
case "$VERSION" in
66
"5.6")
7-
printf "\n" | pecl install xdebug-2.5.5
7+
BEFORE_PWD=$(pwd) \
8+
&& mkdir -p /opt/xdebug \
9+
&& cd /opt/xdebug \
10+
&& curl https://xdebug.org/files/xdebug-2.5.5.tgz -o xdebug-2.5.5.tgz \
11+
&& echo "72108bf2bc514ee7198e10466a0fedcac3df9bbc5bd26ce2ec2dafab990bf1a4" "xdebug-2.5.5.tgz" | sha256sum --check \
12+
&& tar -xzvf xdebug-2.5.5.tgz \
13+
&& cd xdebug-2.5.5 \
14+
&& phpize \
15+
&& ./configure --enable-xdebug \
16+
&& make clean \
17+
&& sed -i 's/-O2/-O0/g' Makefile \
18+
&& make \
19+
&& make test \
20+
&& make install \
21+
&& cd "${BEFORE_PWD}" \
22+
&& rm -r /opt/xdebug
823
;;
924
*)
1025
printf "\n" | pecl install xdebug

0 commit comments

Comments
 (0)