From fffaf840010a53134ece4c3da43a43a8ebc924b7 Mon Sep 17 00:00:00 2001 From: Sam L Date: Mon, 18 Dec 2023 12:09:35 -0500 Subject: [PATCH 01/11] Add support for 8.2 --- bin/generate.sh | 3 ++- build/8.2-apache/Dockerfile | 19 +++++++++++++++++++ build/8.2-apache/xdebug.ini | 13 +++++++++++++ build/8.2-cli/Dockerfile | 19 +++++++++++++++++++ build/8.2-cli/xdebug.ini | 13 +++++++++++++ build/8.2-fpm/Dockerfile | 19 +++++++++++++++++++ build/8.2-fpm/xdebug.ini | 13 +++++++++++++ 7 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 build/8.2-apache/Dockerfile create mode 100644 build/8.2-apache/xdebug.ini create mode 100644 build/8.2-cli/Dockerfile create mode 100644 build/8.2-cli/xdebug.ini create mode 100644 build/8.2-fpm/Dockerfile create mode 100644 build/8.2-fpm/xdebug.ini diff --git a/bin/generate.sh b/bin/generate.sh index 1401b6d..7788491 100755 --- a/bin/generate.sh +++ b/bin/generate.sh @@ -6,7 +6,7 @@ # PHP Versions that will be generated #php_versions=( "8.0" "7.4" "7.2" "7.1" "7.0" "5.6") -php_versions=( "8.1" "8.0" "7.4" "7.2" ) +php_versions=( "8.2" "8.1" "8.0" "7.4" "7.2" ) # PHP variants that will be generated for each PHP version # final source image will be generated as follow: php:7.2-cli, php:7-2-apache and php:7.2-fpm @@ -16,6 +16,7 @@ php_docker_suffix=( "cli" "apache" "fpm" ) # PHP_VERSION => XDEBUG_VERSION declare -A xdebug_versions xdebug_versions=( + ["8.2"]="xdebug-3.3.1" ["8.1"]="xdebug-3.1.3" ["8.0"]="xdebug-3.1.3" ["7.4"]="xdebug-2.9.1" diff --git a/build/8.2-apache/Dockerfile b/build/8.2-apache/Dockerfile new file mode 100644 index 0000000..4fdcb67 --- /dev/null +++ b/build/8.2-apache/Dockerfile @@ -0,0 +1,19 @@ +FROM php:8.2-apache +MAINTAINER Przemek Szalko + +# php intl extension +RUN apt-get update \ + && apt-get install -y libicu-dev \ + && docker-php-ext-install intl \ + && docker-php-ext-install pdo_mysql \ + && docker-php-source delete \ + && apt-get remove -y libicu-dev \ + && apt-get autoremove -y \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN pecl channel-update pecl.php.net \ + && pecl install xdebug-3.3.1 \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file diff --git a/build/8.2-apache/xdebug.ini b/build/8.2-apache/xdebug.ini new file mode 100644 index 0000000..d94419d --- /dev/null +++ b/build/8.2-apache/xdebug.ini @@ -0,0 +1,13 @@ +[xdebug] +zend_extension=xdebug.so + +xdebug.cli_color=1 +xdebug.profiler_enable=0 +xdebug.profiler_enable_trigger=1 + +xdebug.profiler_output_dir="/tmp" +xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" + +xdebug.remote_enable=1 +xdebug.remote_connect_back=1 +xdebug.remote_port=9000 \ No newline at end of file diff --git a/build/8.2-cli/Dockerfile b/build/8.2-cli/Dockerfile new file mode 100644 index 0000000..42ec570 --- /dev/null +++ b/build/8.2-cli/Dockerfile @@ -0,0 +1,19 @@ +FROM php:8.2-cli +MAINTAINER Przemek Szalko + +# php intl extension +RUN apt-get update \ + && apt-get install -y libicu-dev \ + && docker-php-ext-install intl \ + && docker-php-ext-install pdo_mysql \ + && docker-php-source delete \ + && apt-get remove -y libicu-dev \ + && apt-get autoremove -y \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN pecl channel-update pecl.php.net \ + && pecl install xdebug-3.3.1 \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file diff --git a/build/8.2-cli/xdebug.ini b/build/8.2-cli/xdebug.ini new file mode 100644 index 0000000..d94419d --- /dev/null +++ b/build/8.2-cli/xdebug.ini @@ -0,0 +1,13 @@ +[xdebug] +zend_extension=xdebug.so + +xdebug.cli_color=1 +xdebug.profiler_enable=0 +xdebug.profiler_enable_trigger=1 + +xdebug.profiler_output_dir="/tmp" +xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" + +xdebug.remote_enable=1 +xdebug.remote_connect_back=1 +xdebug.remote_port=9000 \ No newline at end of file diff --git a/build/8.2-fpm/Dockerfile b/build/8.2-fpm/Dockerfile new file mode 100644 index 0000000..86691c6 --- /dev/null +++ b/build/8.2-fpm/Dockerfile @@ -0,0 +1,19 @@ +FROM php:8.2-fpm +MAINTAINER Przemek Szalko + +# php intl extension +RUN apt-get update \ + && apt-get install -y libicu-dev \ + && docker-php-ext-install intl \ + && docker-php-ext-install pdo_mysql \ + && docker-php-source delete \ + && apt-get remove -y libicu-dev \ + && apt-get autoremove -y \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN pecl channel-update pecl.php.net \ + && pecl install xdebug-3.3.1 \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file diff --git a/build/8.2-fpm/xdebug.ini b/build/8.2-fpm/xdebug.ini new file mode 100644 index 0000000..d94419d --- /dev/null +++ b/build/8.2-fpm/xdebug.ini @@ -0,0 +1,13 @@ +[xdebug] +zend_extension=xdebug.so + +xdebug.cli_color=1 +xdebug.profiler_enable=0 +xdebug.profiler_enable_trigger=1 + +xdebug.profiler_output_dir="/tmp" +xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" + +xdebug.remote_enable=1 +xdebug.remote_connect_back=1 +xdebug.remote_port=9000 \ No newline at end of file From 24e1ee29dd21a28c9a68b3bf7e89965f23d5e1e0 Mon Sep 17 00:00:00 2001 From: Sam L Date: Mon, 25 Dec 2023 14:39:24 -0500 Subject: [PATCH 02/11] Add support for xdebug version based configuration See "[[u]pgrading from Xdebug 2 to 3](https://xdebug.org/docs/upgrade_guide)" for more details --- bin/generate.sh | 3 ++- build/7.2-apache/Dockerfile | 2 +- build/7.2-apache/xdebug.ini | 2 +- build/7.2-cli/Dockerfile | 2 +- build/7.2-cli/xdebug.ini | 2 +- build/7.2-fpm/Dockerfile | 2 +- build/7.2-fpm/xdebug.ini | 2 +- build/7.4-apache/Dockerfile | 2 +- build/7.4-apache/xdebug.ini | 2 +- build/7.4-cli/Dockerfile | 2 +- build/7.4-cli/xdebug.ini | 2 +- build/7.4-fpm/Dockerfile | 2 +- build/7.4-fpm/xdebug.ini | 2 +- build/8.0-apache/Dockerfile | 2 +- build/8.0-apache/xdebug.ini | 12 ++++++------ build/8.0-cli/Dockerfile | 2 +- build/8.0-cli/xdebug.ini | 12 ++++++------ build/8.0-fpm/Dockerfile | 2 +- build/8.0-fpm/xdebug.ini | 12 ++++++------ build/8.1-apache/Dockerfile | 2 +- build/8.1-apache/xdebug.ini | 12 ++++++------ build/8.1-cli/Dockerfile | 2 +- build/8.1-cli/xdebug.ini | 12 ++++++------ build/8.1-fpm/Dockerfile | 2 +- build/8.1-fpm/xdebug.ini | 12 ++++++------ build/8.2-apache/Dockerfile | 2 +- build/8.2-apache/xdebug.ini | 12 ++++++------ build/8.2-cli/Dockerfile | 2 +- build/8.2-cli/xdebug.ini | 12 ++++++------ build/8.2-fpm/Dockerfile | 2 +- build/8.2-fpm/xdebug.ini | 12 ++++++------ src/Dockerfile | 2 +- src/{xdebug.ini => xdebug-2.ini} | 2 +- src/xdebug-3.ini | 13 +++++++++++++ 34 files changed, 92 insertions(+), 78 deletions(-) rename src/{xdebug.ini => xdebug-2.ini} (91%) create mode 100644 src/xdebug-3.ini diff --git a/bin/generate.sh b/bin/generate.sh index 7788491..dd5b04c 100755 --- a/bin/generate.sh +++ b/bin/generate.sh @@ -39,9 +39,10 @@ for php_version in "${php_versions[@]}"; do base_image="php:${php_version}-${php_suffix}" xdebug_version="${xdebug_versions[${php_version}]}" + xdebug_major_version=`echo "${xdebug_version}" | sed 's/xdebug-\([1-9][0-9]\{0,\}\)\..*/\1/'` mkdir -p "${target_dir}" - cp ./src/xdebug.ini "${target_dir}/xdebug.ini" + cp "./src/xdebug-${xdebug_major_version}.ini" "${target_dir}/xdebug.ini" # shellcheck disable=SC2002 cat ./src/Dockerfile \ diff --git a/build/7.2-apache/Dockerfile b/build/7.2-apache/Dockerfile index 290c454..e7b5c30 100644 --- a/build/7.2-apache/Dockerfile +++ b/build/7.2-apache/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-2.6.0 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/7.2-apache/xdebug.ini b/build/7.2-apache/xdebug.ini index d94419d..94ea677 100644 --- a/build/7.2-apache/xdebug.ini +++ b/build/7.2-apache/xdebug.ini @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" xdebug.remote_enable=1 xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.remote_port=9000 diff --git a/build/7.2-cli/Dockerfile b/build/7.2-cli/Dockerfile index 47bc3ad..171a4ed 100644 --- a/build/7.2-cli/Dockerfile +++ b/build/7.2-cli/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-2.6.0 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/7.2-cli/xdebug.ini b/build/7.2-cli/xdebug.ini index d94419d..94ea677 100644 --- a/build/7.2-cli/xdebug.ini +++ b/build/7.2-cli/xdebug.ini @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" xdebug.remote_enable=1 xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.remote_port=9000 diff --git a/build/7.2-fpm/Dockerfile b/build/7.2-fpm/Dockerfile index 3e88148..e97da3c 100644 --- a/build/7.2-fpm/Dockerfile +++ b/build/7.2-fpm/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-2.6.0 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/7.2-fpm/xdebug.ini b/build/7.2-fpm/xdebug.ini index d94419d..94ea677 100644 --- a/build/7.2-fpm/xdebug.ini +++ b/build/7.2-fpm/xdebug.ini @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" xdebug.remote_enable=1 xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.remote_port=9000 diff --git a/build/7.4-apache/Dockerfile b/build/7.4-apache/Dockerfile index 2e998ff..beb7aa2 100644 --- a/build/7.4-apache/Dockerfile +++ b/build/7.4-apache/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-2.9.1 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/7.4-apache/xdebug.ini b/build/7.4-apache/xdebug.ini index d94419d..94ea677 100644 --- a/build/7.4-apache/xdebug.ini +++ b/build/7.4-apache/xdebug.ini @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" xdebug.remote_enable=1 xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.remote_port=9000 diff --git a/build/7.4-cli/Dockerfile b/build/7.4-cli/Dockerfile index 15d4d09..6f48039 100644 --- a/build/7.4-cli/Dockerfile +++ b/build/7.4-cli/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-2.9.1 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/7.4-cli/xdebug.ini b/build/7.4-cli/xdebug.ini index d94419d..94ea677 100644 --- a/build/7.4-cli/xdebug.ini +++ b/build/7.4-cli/xdebug.ini @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" xdebug.remote_enable=1 xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.remote_port=9000 diff --git a/build/7.4-fpm/Dockerfile b/build/7.4-fpm/Dockerfile index b8dacb2..5812a5e 100644 --- a/build/7.4-fpm/Dockerfile +++ b/build/7.4-fpm/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-2.9.1 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/7.4-fpm/xdebug.ini b/build/7.4-fpm/xdebug.ini index d94419d..94ea677 100644 --- a/build/7.4-fpm/xdebug.ini +++ b/build/7.4-fpm/xdebug.ini @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" xdebug.remote_enable=1 xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.remote_port=9000 diff --git a/build/8.0-apache/Dockerfile b/build/8.0-apache/Dockerfile index 9ccb6a1..227e69d 100644 --- a/build/8.0-apache/Dockerfile +++ b/build/8.0-apache/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-3.1.3 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.0-apache/xdebug.ini b/build/8.0-apache/xdebug.ini index d94419d..a6c56ff 100644 --- a/build/8.0-apache/xdebug.ini +++ b/build/8.0-apache/xdebug.ini @@ -2,12 +2,12 @@ zend_extension=xdebug.so xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug -xdebug.profiler_output_dir="/tmp" +xdebug.output_dir="/tmp" xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.0-cli/Dockerfile b/build/8.0-cli/Dockerfile index 26c81fc..7c2afdc 100644 --- a/build/8.0-cli/Dockerfile +++ b/build/8.0-cli/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-3.1.3 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.0-cli/xdebug.ini b/build/8.0-cli/xdebug.ini index d94419d..a6c56ff 100644 --- a/build/8.0-cli/xdebug.ini +++ b/build/8.0-cli/xdebug.ini @@ -2,12 +2,12 @@ zend_extension=xdebug.so xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug -xdebug.profiler_output_dir="/tmp" +xdebug.output_dir="/tmp" xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.0-fpm/Dockerfile b/build/8.0-fpm/Dockerfile index 2a40c8b..f80362d 100644 --- a/build/8.0-fpm/Dockerfile +++ b/build/8.0-fpm/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-3.1.3 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.0-fpm/xdebug.ini b/build/8.0-fpm/xdebug.ini index d94419d..a6c56ff 100644 --- a/build/8.0-fpm/xdebug.ini +++ b/build/8.0-fpm/xdebug.ini @@ -2,12 +2,12 @@ zend_extension=xdebug.so xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug -xdebug.profiler_output_dir="/tmp" +xdebug.output_dir="/tmp" xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.1-apache/Dockerfile b/build/8.1-apache/Dockerfile index 5d5126b..46a257d 100644 --- a/build/8.1-apache/Dockerfile +++ b/build/8.1-apache/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-3.1.3 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.1-apache/xdebug.ini b/build/8.1-apache/xdebug.ini index d94419d..a6c56ff 100644 --- a/build/8.1-apache/xdebug.ini +++ b/build/8.1-apache/xdebug.ini @@ -2,12 +2,12 @@ zend_extension=xdebug.so xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug -xdebug.profiler_output_dir="/tmp" +xdebug.output_dir="/tmp" xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.1-cli/Dockerfile b/build/8.1-cli/Dockerfile index dd5a7ff..4952ef7 100644 --- a/build/8.1-cli/Dockerfile +++ b/build/8.1-cli/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-3.1.3 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.1-cli/xdebug.ini b/build/8.1-cli/xdebug.ini index d94419d..a6c56ff 100644 --- a/build/8.1-cli/xdebug.ini +++ b/build/8.1-cli/xdebug.ini @@ -2,12 +2,12 @@ zend_extension=xdebug.so xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug -xdebug.profiler_output_dir="/tmp" +xdebug.output_dir="/tmp" xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.1-fpm/Dockerfile b/build/8.1-fpm/Dockerfile index e50f60d..0e1ffc4 100644 --- a/build/8.1-fpm/Dockerfile +++ b/build/8.1-fpm/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-3.1.3 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.1-fpm/xdebug.ini b/build/8.1-fpm/xdebug.ini index d94419d..a6c56ff 100644 --- a/build/8.1-fpm/xdebug.ini +++ b/build/8.1-fpm/xdebug.ini @@ -2,12 +2,12 @@ zend_extension=xdebug.so xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug -xdebug.profiler_output_dir="/tmp" +xdebug.output_dir="/tmp" xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.2-apache/Dockerfile b/build/8.2-apache/Dockerfile index 4fdcb67..2ce61c7 100644 --- a/build/8.2-apache/Dockerfile +++ b/build/8.2-apache/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-3.3.1 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.2-apache/xdebug.ini b/build/8.2-apache/xdebug.ini index d94419d..a6c56ff 100644 --- a/build/8.2-apache/xdebug.ini +++ b/build/8.2-apache/xdebug.ini @@ -2,12 +2,12 @@ zend_extension=xdebug.so xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug -xdebug.profiler_output_dir="/tmp" +xdebug.output_dir="/tmp" xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.2-cli/Dockerfile b/build/8.2-cli/Dockerfile index 42ec570..1d3a7e4 100644 --- a/build/8.2-cli/Dockerfile +++ b/build/8.2-cli/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-3.3.1 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.2-cli/xdebug.ini b/build/8.2-cli/xdebug.ini index d94419d..a6c56ff 100644 --- a/build/8.2-cli/xdebug.ini +++ b/build/8.2-cli/xdebug.ini @@ -2,12 +2,12 @@ zend_extension=xdebug.so xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug -xdebug.profiler_output_dir="/tmp" +xdebug.output_dir="/tmp" xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.2-fpm/Dockerfile b/build/8.2-fpm/Dockerfile index 86691c6..ebd39b5 100644 --- a/build/8.2-fpm/Dockerfile +++ b/build/8.2-fpm/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install xdebug-3.3.1 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.2-fpm/xdebug.ini b/build/8.2-fpm/xdebug.ini index d94419d..a6c56ff 100644 --- a/build/8.2-fpm/xdebug.ini +++ b/build/8.2-fpm/xdebug.ini @@ -2,12 +2,12 @@ zend_extension=xdebug.so xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug -xdebug.profiler_output_dir="/tmp" +xdebug.output_dir="/tmp" xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/src/Dockerfile b/src/Dockerfile index 97d7d8c..43ad776 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \ && pecl install #XDEBUG_VERSION# \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/src/xdebug.ini b/src/xdebug-2.ini similarity index 91% rename from src/xdebug.ini rename to src/xdebug-2.ini index d94419d..94ea677 100644 --- a/src/xdebug.ini +++ b/src/xdebug-2.ini @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" xdebug.remote_enable=1 xdebug.remote_connect_back=1 -xdebug.remote_port=9000 \ No newline at end of file +xdebug.remote_port=9000 diff --git a/src/xdebug-3.ini b/src/xdebug-3.ini new file mode 100644 index 0000000..a6c56ff --- /dev/null +++ b/src/xdebug-3.ini @@ -0,0 +1,13 @@ +[xdebug] +zend_extension=xdebug.so + +xdebug.cli_color=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug + +xdebug.output_dir="/tmp" +xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" + +xdebug.discover_client_host=true +xdebug.client_port=9003 From bea61506b299018335c11b43f5784179d9bc0115 Mon Sep 17 00:00:00 2001 From: Sam L Date: Mon, 5 May 2025 07:53:23 -0400 Subject: [PATCH 03/11] Initial commit, issue-8 --- README.md | 12 ++++++++++-- bin/generate.sh | 4 ++-- build/8.3-apache/Dockerfile | 19 +++++++++++++++++++ build/8.3-apache/xdebug.ini | 13 +++++++++++++ build/8.3-cli/Dockerfile | 19 +++++++++++++++++++ build/8.3-cli/xdebug.ini | 13 +++++++++++++ build/8.3-fpm/Dockerfile | 19 +++++++++++++++++++ build/8.3-fpm/xdebug.ini | 13 +++++++++++++ 8 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 build/8.3-apache/Dockerfile create mode 100644 build/8.3-apache/xdebug.ini create mode 100644 build/8.3-cli/Dockerfile create mode 100644 build/8.3-cli/xdebug.ini create mode 100644 build/8.3-fpm/Dockerfile create mode 100644 build/8.3-fpm/xdebug.ini diff --git a/README.md b/README.md index f38204e..defbc68 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,15 @@ Supported tags: * mobtitude/php-xdebug:7.2-apache * mobtitude/php-xdebug:7.2-cli * mobtitude/php-xdebug:7.2-fpm - +* mobtitude/php-xdebug:8.1-apache +* mobtitude/php-xdebug:8.1-cli +* mobtitude/php-xdebug:8.1-fpm +* mobtitude/php-xdebug:8.2-apache +* mobtitude/php-xdebug:8.2-cli +* mobtitude/php-xdebug:8.2-fpm +* mobtitude/php-xdebug:8.3-apache +* mobtitude/php-xdebug:8.3-cli +* mobtitude/php-xdebug:8.3-fpm Build from source ------------------- @@ -84,4 +92,4 @@ FAQ Q: Why images don't have specific PHP version like `7.2.2` but only major and minor version `7.2`? A: It is because images in this repo have always the newest possible patch version of PHP based on official Docker PHP images. -For example for `mobtitude/php-xdebug:7.2-apache` you can expect that it is always the newest PHP version available in official Docker Registry and it is automatically updated when official PHP Docker images are updated. The newest possible PHP version at the time of writing is 7.2.2, but will be automatically updated to 7.2.3 when official PHP Docker images are updated. \ No newline at end of file +For example for `mobtitude/php-xdebug:7.2-apache` you can expect that it is always the newest PHP version available in official Docker Registry and it is automatically updated when official PHP Docker images are updated. The newest possible PHP version at the time of writing is 7.2.2, but will be automatically updated to 7.2.3 when official PHP Docker images are updated. diff --git a/bin/generate.sh b/bin/generate.sh index dd5b04c..78a4276 100755 --- a/bin/generate.sh +++ b/bin/generate.sh @@ -5,8 +5,7 @@ # # PHP Versions that will be generated -#php_versions=( "8.0" "7.4" "7.2" "7.1" "7.0" "5.6") -php_versions=( "8.2" "8.1" "8.0" "7.4" "7.2" ) +php_versions=( "8.3" "8.2" "8.1" "8.0" "7.4" "7.2" ) # PHP variants that will be generated for each PHP version # final source image will be generated as follow: php:7.2-cli, php:7-2-apache and php:7.2-fpm @@ -16,6 +15,7 @@ php_docker_suffix=( "cli" "apache" "fpm" ) # PHP_VERSION => XDEBUG_VERSION declare -A xdebug_versions xdebug_versions=( + ["8.3"]="xdebug-3.3.1" ["8.2"]="xdebug-3.3.1" ["8.1"]="xdebug-3.1.3" ["8.0"]="xdebug-3.1.3" diff --git a/build/8.3-apache/Dockerfile b/build/8.3-apache/Dockerfile new file mode 100644 index 0000000..43b5f9c --- /dev/null +++ b/build/8.3-apache/Dockerfile @@ -0,0 +1,19 @@ +FROM php:8.3-apache +MAINTAINER Przemek Szalko + +# php intl extension +RUN apt-get update \ + && apt-get install -y libicu-dev \ + && docker-php-ext-install intl \ + && docker-php-ext-install pdo_mysql \ + && docker-php-source delete \ + && apt-get remove -y libicu-dev \ + && apt-get autoremove -y \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN pecl channel-update pecl.php.net \ + && pecl install xdebug-3.3.1 \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.3-apache/xdebug.ini b/build/8.3-apache/xdebug.ini new file mode 100644 index 0000000..a6c56ff --- /dev/null +++ b/build/8.3-apache/xdebug.ini @@ -0,0 +1,13 @@ +[xdebug] +zend_extension=xdebug.so + +xdebug.cli_color=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug + +xdebug.output_dir="/tmp" +xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" + +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.3-cli/Dockerfile b/build/8.3-cli/Dockerfile new file mode 100644 index 0000000..d1ab114 --- /dev/null +++ b/build/8.3-cli/Dockerfile @@ -0,0 +1,19 @@ +FROM php:8.3-cli +MAINTAINER Przemek Szalko + +# php intl extension +RUN apt-get update \ + && apt-get install -y libicu-dev \ + && docker-php-ext-install intl \ + && docker-php-ext-install pdo_mysql \ + && docker-php-source delete \ + && apt-get remove -y libicu-dev \ + && apt-get autoremove -y \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN pecl channel-update pecl.php.net \ + && pecl install xdebug-3.3.1 \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.3-cli/xdebug.ini b/build/8.3-cli/xdebug.ini new file mode 100644 index 0000000..a6c56ff --- /dev/null +++ b/build/8.3-cli/xdebug.ini @@ -0,0 +1,13 @@ +[xdebug] +zend_extension=xdebug.so + +xdebug.cli_color=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug + +xdebug.output_dir="/tmp" +xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" + +xdebug.discover_client_host=true +xdebug.client_port=9003 diff --git a/build/8.3-fpm/Dockerfile b/build/8.3-fpm/Dockerfile new file mode 100644 index 0000000..92a6f45 --- /dev/null +++ b/build/8.3-fpm/Dockerfile @@ -0,0 +1,19 @@ +FROM php:8.3-fpm +MAINTAINER Przemek Szalko + +# php intl extension +RUN apt-get update \ + && apt-get install -y libicu-dev \ + && docker-php-ext-install intl \ + && docker-php-ext-install pdo_mysql \ + && docker-php-source delete \ + && apt-get remove -y libicu-dev \ + && apt-get autoremove -y \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN pecl channel-update pecl.php.net \ + && pecl install xdebug-3.3.1 \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/8.3-fpm/xdebug.ini b/build/8.3-fpm/xdebug.ini new file mode 100644 index 0000000..a6c56ff --- /dev/null +++ b/build/8.3-fpm/xdebug.ini @@ -0,0 +1,13 @@ +[xdebug] +zend_extension=xdebug.so + +xdebug.cli_color=1 +xdebug.mode=debug +xdebug.start_with_request=trigger +xdebug.trigger_value=StartXDebug + +xdebug.output_dir="/tmp" +xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" + +xdebug.discover_client_host=true +xdebug.client_port=9003 From 49b5d12679128e67daedc907ebb81f1b678557d6 Mon Sep 17 00:00:00 2001 From: Sam L Date: Wed, 26 Nov 2025 11:59:16 -0500 Subject: [PATCH 04/11] Add github action scaffolding --- .github/workflows/pipes.yaml | 49 +++++++++++++++++++++++++++++++++ .gitignore | 6 +++- bin/build-all.sh | 1 + scripts/git-has-changes.sh | 5 ++++ scripts/test-all-images.sh | 46 +++++++++++++++++++++++++++++++ scripts/test-xdebug-install.php | 21 ++++++++++++++ 6 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pipes.yaml create mode 100755 scripts/git-has-changes.sh create mode 100755 scripts/test-all-images.sh create mode 100644 scripts/test-xdebug-install.php diff --git a/.github/workflows/pipes.yaml b/.github/workflows/pipes.yaml new file mode 100644 index 0000000..e3ac859 --- /dev/null +++ b/.github/workflows/pipes.yaml @@ -0,0 +1,49 @@ +name: Pipes + +on: + pull_request: + branches: + - master + paths: + - 'bin/**' + - 'build/**' + - 'scripts/**' + - 'src/**' + types: + - labeled + - unlabeled + - opened + - synchronize + push: + branches: + - master + paths: + - 'bin/**' + - 'build/**' + - 'scripts/**' + - 'src/**' + workflow_dispatch: + +jobs: + # build images and ensure no git diff + # run phpinfo and ensure correct version of xdebug is installed + build_and_verify: + name: Build and Verify + if: | + github.event_name == 'push' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci')) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Verify builds are correct + run: | + make clean + make generate + ./scripts/git-has-changes.sh + - name: Build docker images + run: | + make build + - name: Verify docker images + run: | + ./scripts/test-all-images.sh diff --git a/.gitignore b/.gitignore index a09c56d..6977e17 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ -/.idea +.* + +!.gitignore + +!.github/ diff --git a/bin/build-all.sh b/bin/build-all.sh index c2479a2..4f482c5 100755 --- a/bin/build-all.sh +++ b/bin/build-all.sh @@ -60,4 +60,5 @@ if [ "${#build_failed[@]}" -gt 0 ]; then for img in "${build_failed[@]}"; do echo "${text_red}* ${img}${text_normal}" done + exit 1 fi diff --git a/scripts/git-has-changes.sh b/scripts/git-has-changes.sh new file mode 100755 index 0000000..90fb303 --- /dev/null +++ b/scripts/git-has-changes.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +if [[ -n $(git status --porcelain --untracked-files=no) ]]; then + exit 1 +fi diff --git a/scripts/test-all-images.sh b/scripts/test-all-images.sh new file mode 100755 index 0000000..263cd85 --- /dev/null +++ b/scripts/test-all-images.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# +# Script builds all Dockerfiles defined in build directory +# Prints summary after all images have been built (successfully or not) +# + +image_name="$1" + +# Checks if image name was provided by user +if [ -z "${image_name}" ]; then + echo "Usage: $0 [docker_image_name]" >&2 + exit -1 +fi + +# Change current path to project root +script_path=$(dirname "$0") +cd "${script_path}/../" || exit -1 + +# Text formatting +text_bold=$(tput bold) +text_red=$(tput setaf 1) +text_normal=$(tput sgr0) + +# Loop through all available directories in ./build +for i in ./build/*/; do + version=$(basename "$i"); + image="${image_name}:${version}" + + echo "${text_bold}* Testing ${image} ${text_normal}" + + docker run \ + --volume ./scripts/test-xdebug-install.php:/app/test-xdebug-install.php \ + --workdir /app \ + $image + + + # Builds image and check for return code + if docker build --pull -t "${image}" "./build/${version}"; then + build_done+=( "${image}" ) + else + echo "${text_bold}${text_red}* ERROR when building ${image} ${text_normal}" + build_failed+=( "${image}" ) + fi +done + diff --git a/scripts/test-xdebug-install.php b/scripts/test-xdebug-install.php new file mode 100644 index 0000000..46ba961 --- /dev/null +++ b/scripts/test-xdebug-install.php @@ -0,0 +1,21 @@ + Date: Wed, 26 Nov 2025 13:44:21 -0500 Subject: [PATCH 05/11] Fix git diff script --- scripts/git-has-changes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/git-has-changes.sh b/scripts/git-has-changes.sh index 90fb303..93c7863 100755 --- a/scripts/git-has-changes.sh +++ b/scripts/git-has-changes.sh @@ -1,5 +1,5 @@ #!/usr/bin/env sh -if [[ -n $(git status --porcelain --untracked-files=no) ]]; then +if git status --porcelain --untracked-files=no; then exit 1 fi From 392851bde1a8f539589801c685fe496fa0d5d480 Mon Sep 17 00:00:00 2001 From: Sam L Date: Wed, 26 Nov 2025 13:47:38 -0500 Subject: [PATCH 06/11] s --- scripts/git-has-changes.sh | 2 +- scripts/{test-all-images.sh => test-cli-images.sh} | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) rename scripts/{test-all-images.sh => test-cli-images.sh} (75%) diff --git a/scripts/git-has-changes.sh b/scripts/git-has-changes.sh index 93c7863..edc4611 100755 --- a/scripts/git-has-changes.sh +++ b/scripts/git-has-changes.sh @@ -1,5 +1,5 @@ #!/usr/bin/env sh -if git status --porcelain --untracked-files=no; then +if [ -n "$(git status --porcelain --untracked-files=no)" ]; then exit 1 fi diff --git a/scripts/test-all-images.sh b/scripts/test-cli-images.sh similarity index 75% rename from scripts/test-all-images.sh rename to scripts/test-cli-images.sh index 263cd85..805e31b 100755 --- a/scripts/test-all-images.sh +++ b/scripts/test-cli-images.sh @@ -32,15 +32,9 @@ for i in ./build/*/; do docker run \ --volume ./scripts/test-xdebug-install.php:/app/test-xdebug-install.php \ --workdir /app \ - $image + --entrypoint php \ + "${image}" test-xdebug-install.php - - # Builds image and check for return code - if docker build --pull -t "${image}" "./build/${version}"; then - build_done+=( "${image}" ) - else - echo "${text_bold}${text_red}* ERROR when building ${image} ${text_normal}" - build_failed+=( "${image}" ) - fi + exit 0 done From e0de83a754de77e62f4510fb5258b9e120b11752 Mon Sep 17 00:00:00 2001 From: Sam L Date: Wed, 26 Nov 2025 14:05:50 -0500 Subject: [PATCH 07/11] Remove PHP 7.2 (and older versions) --- bin/generate.sh | 4 ---- build/7.2-apache/Dockerfile | 19 ------------------- build/7.2-apache/xdebug.ini | 13 ------------- build/7.2-cli/Dockerfile | 19 ------------------- build/7.2-cli/xdebug.ini | 13 ------------- build/7.2-fpm/Dockerfile | 19 ------------------- build/7.2-fpm/xdebug.ini | 13 ------------- ...ages.sh => build-and-verify-cli-images.sh} | 12 ++++++++++++ 8 files changed, 12 insertions(+), 100 deletions(-) delete mode 100644 build/7.2-apache/Dockerfile delete mode 100644 build/7.2-apache/xdebug.ini delete mode 100644 build/7.2-cli/Dockerfile delete mode 100644 build/7.2-cli/xdebug.ini delete mode 100644 build/7.2-fpm/Dockerfile delete mode 100644 build/7.2-fpm/xdebug.ini rename scripts/{test-cli-images.sh => build-and-verify-cli-images.sh} (72%) diff --git a/bin/generate.sh b/bin/generate.sh index 78a4276..2276da5 100755 --- a/bin/generate.sh +++ b/bin/generate.sh @@ -20,10 +20,6 @@ xdebug_versions=( ["8.1"]="xdebug-3.1.3" ["8.0"]="xdebug-3.1.3" ["7.4"]="xdebug-2.9.1" - ["7.2"]="xdebug-2.6.0" - ["7.1"]="xdebug-2.6.0" - ["7.0"]="xdebug-2.6.0" - ["5.6"]="xdebug-2.5.5" ) diff --git a/build/7.2-apache/Dockerfile b/build/7.2-apache/Dockerfile deleted file mode 100644 index e7b5c30..0000000 --- a/build/7.2-apache/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM php:7.2-apache -MAINTAINER Przemek Szalko - -# php intl extension -RUN apt-get update \ - && apt-get install -y libicu-dev \ - && docker-php-ext-install intl \ - && docker-php-ext-install pdo_mysql \ - && docker-php-source delete \ - && apt-get remove -y libicu-dev \ - && apt-get autoremove -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN pecl channel-update pecl.php.net \ - && pecl install xdebug-2.6.0 \ - && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/7.2-apache/xdebug.ini b/build/7.2-apache/xdebug.ini deleted file mode 100644 index 94ea677..0000000 --- a/build/7.2-apache/xdebug.ini +++ /dev/null @@ -1,13 +0,0 @@ -[xdebug] -zend_extension=xdebug.so - -xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 - -xdebug.profiler_output_dir="/tmp" -xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" - -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 diff --git a/build/7.2-cli/Dockerfile b/build/7.2-cli/Dockerfile deleted file mode 100644 index 171a4ed..0000000 --- a/build/7.2-cli/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM php:7.2-cli -MAINTAINER Przemek Szalko - -# php intl extension -RUN apt-get update \ - && apt-get install -y libicu-dev \ - && docker-php-ext-install intl \ - && docker-php-ext-install pdo_mysql \ - && docker-php-source delete \ - && apt-get remove -y libicu-dev \ - && apt-get autoremove -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN pecl channel-update pecl.php.net \ - && pecl install xdebug-2.6.0 \ - && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/7.2-cli/xdebug.ini b/build/7.2-cli/xdebug.ini deleted file mode 100644 index 94ea677..0000000 --- a/build/7.2-cli/xdebug.ini +++ /dev/null @@ -1,13 +0,0 @@ -[xdebug] -zend_extension=xdebug.so - -xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 - -xdebug.profiler_output_dir="/tmp" -xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" - -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 diff --git a/build/7.2-fpm/Dockerfile b/build/7.2-fpm/Dockerfile deleted file mode 100644 index e97da3c..0000000 --- a/build/7.2-fpm/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM php:7.2-fpm -MAINTAINER Przemek Szalko - -# php intl extension -RUN apt-get update \ - && apt-get install -y libicu-dev \ - && docker-php-ext-install intl \ - && docker-php-ext-install pdo_mysql \ - && docker-php-source delete \ - && apt-get remove -y libicu-dev \ - && apt-get autoremove -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN pecl channel-update pecl.php.net \ - && pecl install xdebug-2.6.0 \ - && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - -COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini diff --git a/build/7.2-fpm/xdebug.ini b/build/7.2-fpm/xdebug.ini deleted file mode 100644 index 94ea677..0000000 --- a/build/7.2-fpm/xdebug.ini +++ /dev/null @@ -1,13 +0,0 @@ -[xdebug] -zend_extension=xdebug.so - -xdebug.cli_color=1 -xdebug.profiler_enable=0 -xdebug.profiler_enable_trigger=1 - -xdebug.profiler_output_dir="/tmp" -xdebug.profiler_output_name="cachegrind.out.%H.%t.%p" - -xdebug.remote_enable=1 -xdebug.remote_connect_back=1 -xdebug.remote_port=9000 diff --git a/scripts/test-cli-images.sh b/scripts/build-and-verify-cli-images.sh similarity index 72% rename from scripts/test-cli-images.sh rename to scripts/build-and-verify-cli-images.sh index 805e31b..dfa412f 100755 --- a/scripts/test-cli-images.sh +++ b/scripts/build-and-verify-cli-images.sh @@ -26,6 +26,18 @@ text_normal=$(tput sgr0) for i in ./build/*/; do version=$(basename "$i"); image="${image_name}:${version}" + + if [ "$version" == "${version%"cli"*}" ]; then + continue + fi + + echo "${text_bold}* Building ${image} ${text_normal}" + + # Builds image and check for return code + if [ "$(docker build --pull -t "${image}" "./build/${version}")" -eq 0 ]; then + echo "${text_bold}${text_red}* ERROR when building ${image} ${text_normal}" + exit 1 + fi echo "${text_bold}* Testing ${image} ${text_normal}" From 66e29b4279885aec6d99401d81a31ad83582aadd Mon Sep 17 00:00:00 2001 From: Sam L Date: Wed, 26 Nov 2025 14:12:40 -0500 Subject: [PATCH 08/11] Update ci/cd scripts --- scripts/build-and-verify-cli-images.sh | 4 +--- scripts/git-has-changes.sh | 4 ++-- scripts/test-xdebug-install.php | 29 +++++++++++++------------- 3 files changed, 17 insertions(+), 20 deletions(-) mode change 100644 => 100755 scripts/test-xdebug-install.php diff --git a/scripts/build-and-verify-cli-images.sh b/scripts/build-and-verify-cli-images.sh index dfa412f..5e4561d 100755 --- a/scripts/build-and-verify-cli-images.sh +++ b/scripts/build-and-verify-cli-images.sh @@ -34,7 +34,7 @@ for i in ./build/*/; do echo "${text_bold}* Building ${image} ${text_normal}" # Builds image and check for return code - if [ "$(docker build --pull -t "${image}" "./build/${version}")" -eq 0 ]; then + if ! docker build --pull -t "${image}" "./build/${version}"; then echo "${text_bold}${text_red}* ERROR when building ${image} ${text_normal}" exit 1 fi @@ -46,7 +46,5 @@ for i in ./build/*/; do --workdir /app \ --entrypoint php \ "${image}" test-xdebug-install.php - - exit 0 done diff --git a/scripts/git-has-changes.sh b/scripts/git-has-changes.sh index edc4611..59278d4 100755 --- a/scripts/git-has-changes.sh +++ b/scripts/git-has-changes.sh @@ -1,5 +1,5 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash -if [ -n "$(git status --porcelain --untracked-files=no)" ]; then +if [[ -n $(git status --porcelain --untracked-files=no) ]]; then exit 1 fi diff --git a/scripts/test-xdebug-install.php b/scripts/test-xdebug-install.php old mode 100644 new mode 100755 index 46ba961..21a8f78 --- a/scripts/test-xdebug-install.php +++ b/scripts/test-xdebug-install.php @@ -1,21 +1,20 @@ Date: Wed, 26 Nov 2025 14:12:56 -0500 Subject: [PATCH 09/11] Update pipes --- .github/workflows/pipes.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pipes.yaml b/.github/workflows/pipes.yaml index e3ac859..3f78884 100644 --- a/.github/workflows/pipes.yaml +++ b/.github/workflows/pipes.yaml @@ -41,9 +41,6 @@ jobs: make clean make generate ./scripts/git-has-changes.sh - - name: Build docker images + - name: Build and verify CLI docker images run: | - make build - - name: Verify docker images - run: | - ./scripts/test-all-images.sh + ./scripts/build-and-verify-images.sh mobtitude/php-xdebug From a2e83933f707c3bd8fab9e3aa1a8f692d3398965 Mon Sep 17 00:00:00 2001 From: Sam L Date: Wed, 26 Nov 2025 14:14:00 -0500 Subject: [PATCH 10/11] s --- .github/workflows/pipes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipes.yaml b/.github/workflows/pipes.yaml index 3f78884..79a9a97 100644 --- a/.github/workflows/pipes.yaml +++ b/.github/workflows/pipes.yaml @@ -43,4 +43,4 @@ jobs: ./scripts/git-has-changes.sh - name: Build and verify CLI docker images run: | - ./scripts/build-and-verify-images.sh mobtitude/php-xdebug + ./scripts/build-and-verify-cli-images.sh mobtitude/php-xdebug From b0a53b99f480f559b3ed48d79b40f4ba7824873c Mon Sep 17 00:00:00 2001 From: Sam L Date: Wed, 26 Nov 2025 14:16:24 -0500 Subject: [PATCH 11/11] Do not generate files for PHP 7.2 --- bin/generate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/generate.sh b/bin/generate.sh index 2276da5..ade5e99 100755 --- a/bin/generate.sh +++ b/bin/generate.sh @@ -5,7 +5,7 @@ # # PHP Versions that will be generated -php_versions=( "8.3" "8.2" "8.1" "8.0" "7.4" "7.2" ) +php_versions=( "8.3" "8.2" "8.1" "8.0" "7.4" ) # PHP variants that will be generated for each PHP version # final source image will be generated as follow: php:7.2-cli, php:7-2-apache and php:7.2-fpm