Skip to content

Commit 24e1ee2

Browse files
committed
Add support for xdebug version based configuration
See "[[u]pgrading from Xdebug 2 to 3](https://xdebug.org/docs/upgrade_guide)" for more details
1 parent fffaf84 commit 24e1ee2

File tree

34 files changed

+92
-78
lines changed

34 files changed

+92
-78
lines changed

bin/generate.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ for php_version in "${php_versions[@]}"; do
3939

4040
base_image="php:${php_version}-${php_suffix}"
4141
xdebug_version="${xdebug_versions[${php_version}]}"
42+
xdebug_major_version=`echo "${xdebug_version}" | sed 's/xdebug-\([1-9][0-9]\{0,\}\)\..*/\1/'`
4243

4344
mkdir -p "${target_dir}"
44-
cp ./src/xdebug.ini "${target_dir}/xdebug.ini"
45+
cp "./src/xdebug-${xdebug_major_version}.ini" "${target_dir}/xdebug.ini"
4546

4647
# shellcheck disable=SC2002
4748
cat ./src/Dockerfile \

build/7.2-apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
1616
&& pecl install xdebug-2.6.0 \
1717
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1818

19-
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
19+
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

build/7.2-apache/xdebug.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"
1010

1111
xdebug.remote_enable=1
1212
xdebug.remote_connect_back=1
13-
xdebug.remote_port=9000
13+
xdebug.remote_port=9000

build/7.2-cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
1616
&& pecl install xdebug-2.6.0 \
1717
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1818

19-
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
19+
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

build/7.2-cli/xdebug.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"
1010

1111
xdebug.remote_enable=1
1212
xdebug.remote_connect_back=1
13-
xdebug.remote_port=9000
13+
xdebug.remote_port=9000

build/7.2-fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
1616
&& pecl install xdebug-2.6.0 \
1717
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1818

19-
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
19+
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

build/7.2-fpm/xdebug.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"
1010

1111
xdebug.remote_enable=1
1212
xdebug.remote_connect_back=1
13-
xdebug.remote_port=9000
13+
xdebug.remote_port=9000

build/7.4-apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
1616
&& pecl install xdebug-2.9.1 \
1717
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1818

19-
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
19+
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

build/7.4-apache/xdebug.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"
1010

1111
xdebug.remote_enable=1
1212
xdebug.remote_connect_back=1
13-
xdebug.remote_port=9000
13+
xdebug.remote_port=9000

build/7.4-cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
1616
&& pecl install xdebug-2.9.1 \
1717
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1818

19-
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
19+
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

0 commit comments

Comments
 (0)