From 4ddeb426d2c6883461ed4a910d4d86e2c802a4a6 Mon Sep 17 00:00:00 2001 From: Jacob Kiers Date: Thu, 6 Jan 2022 18:36:49 +0100 Subject: [PATCH] Make xdebug version-aware Signed-off-by: Jacob Kiers --- bin/xdebug | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/xdebug b/bin/xdebug index 9f38775..0ff3a9c 100755 --- a/bin/xdebug +++ b/bin/xdebug @@ -1,5 +1,8 @@ #!/usr/bin/env bash +VERSION=$1 +shift 1 + COMMAND=$1; shift 1 @@ -12,4 +15,4 @@ if [ ! -f "${COMMAND}" ]; then exit 1; fi -PHP_IDE_CONFIG="serverName=local" XDEBUG_CONFIG="remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0" php -d zend_extension=xdebug.so $COMMAND "$@" +PHP_IDE_CONFIG="serverName=local" XDEBUG_CONFIG="remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0" php$VERSION -d zend_extension=xdebug.so $COMMAND "$@"