diff --git a/.tests/tests/config-xdebug.sh b/.tests/tests/config-xdebug.sh index bd41b816..517d0ef8 100755 --- a/.tests/tests/config-xdebug.sh +++ b/.tests/tests/config-xdebug.sh @@ -60,18 +60,18 @@ fi ### Xdebug default disabled ### printf "[TEST] Xdebug default disabled" -if [ "${PHP_VERSION}" = "8.0" ] || [ "${PHP_VERSION}" = "8.1" ]; then - if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.mode' | grep -E 'develop.+develop' >/dev/null" "${RETRIES}" "" "0"; then +if [ "${PHP_VERSION}" = "5.2" ] || [ "${PHP_VERSION}" = "5.3" ] || [ "${PHP_VERSION}" = "5.4" ] || [ "${PHP_VERSION}" = "5.5" ] || [ "${PHP_VERSION}" = "5.6" ] || [ "${PHP_VERSION}" = "7.0" ] || [ "${PHP_VERSION}" = "7.1" ]; then + if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_enable' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then printf "\\r[FAIL] Xdebug default disabled\\n" - run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.mode' || true" + run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_enable' || true" exit 1 else printf "\\r[OK] Xdebug default disabled\\n" fi else - if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_enable' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then + if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.mode' | grep -E 'develop.+develop' >/dev/null" "${RETRIES}" "" "0"; then printf "\\r[FAIL] Xdebug default disabled\\n" - run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_enable' || true" + run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.mode' || true" exit 1 else printf "\\r[OK] Xdebug default disabled\\n" @@ -82,15 +82,7 @@ fi ### Xdebug autostart disabled ### printf "[TEST] Xdebug autostart disabled" -if [ "${PHP_VERSION}" = "8.0" ] || [ "${PHP_VERSION}" = "8.1" ]; then - if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.start_with_request' | grep -E 'default.+default' >/dev/null" "${RETRIES}" "" "0"; then - printf "\\r[FAIL] Xdebug autostart disabled\\n" - run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.start_with_request' || true" - exit 1 - else - printf "\\r[OK] Xdebug autostart disabled\\n" - fi -else +if [ "${PHP_VERSION}" = "5.2" ] || [ "${PHP_VERSION}" = "5.3" ] || [ "${PHP_VERSION}" = "5.4" ] || [ "${PHP_VERSION}" = "5.5" ] || [ "${PHP_VERSION}" = "5.6" ] || [ "${PHP_VERSION}" = "7.0" ] || [ "${PHP_VERSION}" = "7.1" ]; then if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_autostart' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then printf "\\r[FAIL] Xdebug autostart disabled\\n" run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_autostart' || true" @@ -98,4 +90,12 @@ else else printf "\\r[OK] Xdebug autostart disabled\\n" fi +else + if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.start_with_request' | grep -E 'default.+default' >/dev/null" "${RETRIES}" "" "0"; then + printf "\\r[FAIL] Xdebug autostart disabled\\n" + run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.start_with_request' || true" + exit 1 + else + printf "\\r[OK] Xdebug autostart disabled\\n" + fi fi diff --git a/cfg/php-ini-7.2/devilbox-php.ini-xdebug b/cfg/php-ini-7.2/devilbox-php.ini-xdebug index d3e977b5..d0629d1c 100644 --- a/cfg/php-ini-7.2/devilbox-php.ini-xdebug +++ b/cfg/php-ini-7.2/devilbox-php.ini-xdebug @@ -21,13 +21,12 @@ [PHP] ; Xdebug +; https://3.xdebug.org/docs/upgrade_guide ; Use these settings to enable Xdebug for PHP ; Make sure to read up on Xdebug some settings might significantly slow down requests. ; The following is just an example configuration and should be adjusted -xdebug.default_enable = On -xdebug.profiler_enable = On -xdebug.remote_enable = On -xdebug.remote_autostart = On +xdebug.mode = debug +xdebug.start_with_request = yes xdebug.remote_handler = dbgp xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM diff --git a/cfg/php-ini-7.3/devilbox-php.ini-xdebug b/cfg/php-ini-7.3/devilbox-php.ini-xdebug index d3e977b5..d0629d1c 100644 --- a/cfg/php-ini-7.3/devilbox-php.ini-xdebug +++ b/cfg/php-ini-7.3/devilbox-php.ini-xdebug @@ -21,13 +21,12 @@ [PHP] ; Xdebug +; https://3.xdebug.org/docs/upgrade_guide ; Use these settings to enable Xdebug for PHP ; Make sure to read up on Xdebug some settings might significantly slow down requests. ; The following is just an example configuration and should be adjusted -xdebug.default_enable = On -xdebug.profiler_enable = On -xdebug.remote_enable = On -xdebug.remote_autostart = On +xdebug.mode = debug +xdebug.start_with_request = yes xdebug.remote_handler = dbgp xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM diff --git a/cfg/php-ini-7.4/devilbox-php.ini-xdebug b/cfg/php-ini-7.4/devilbox-php.ini-xdebug index d3e977b5..d0629d1c 100644 --- a/cfg/php-ini-7.4/devilbox-php.ini-xdebug +++ b/cfg/php-ini-7.4/devilbox-php.ini-xdebug @@ -21,13 +21,12 @@ [PHP] ; Xdebug +; https://3.xdebug.org/docs/upgrade_guide ; Use these settings to enable Xdebug for PHP ; Make sure to read up on Xdebug some settings might significantly slow down requests. ; The following is just an example configuration and should be adjusted -xdebug.default_enable = On -xdebug.profiler_enable = On -xdebug.remote_enable = On -xdebug.remote_autostart = On +xdebug.mode = debug +xdebug.start_with_request = yes xdebug.remote_handler = dbgp xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM