From 0d51229a36ed98f830898f01ae727326f697c1f3 Mon Sep 17 00:00:00 2001 From: Wim Date: Wed, 23 Nov 2022 13:54:13 +0100 Subject: [PATCH 1/2] feat(php@8.1): add php 8.1 and xdebug to install script --- install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 install.sh diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index 37b77d9..ded6303 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/bash # If you're adding a new version, you need an additional XDEBUG version, not retrieved dynamically. -PHPS='php@7.2 php@7.3 php@7.4' +PHPS='php@7.2 php@7.3 php@7.4 php@8.1' spinner() { local pid=$! @@ -94,7 +94,11 @@ install_php() { CURRENT_DIR=$PWD XDEBUG_DIR="$HOME/.xdebug$PHP" rm -rf $XDEBUG_DIR - git clone -b 2.9.6 git://github.com/xdebug/xdebug.git $XDEBUG_DIR 2>/dev/null & + + XDEBUG_VERSION='2.9.6' + [ $PHPVERSION == '8.1' ] && XDEBUG_VERSION='3.1.6' + + git clone -b $XDEBUG_VERSION git@github.com:xdebug/xdebug.git $XDEBUG_DIR 2>/dev/null & spinner cd $XDEBUG_DIR @@ -124,6 +128,7 @@ install_php() { [ $PHPVERSION = '7.2' ] && XDEBUG='20170718' [ $PHPVERSION = '7.3' ] && XDEBUG='20180731' [ $PHPVERSION = '7.4' ] && XDEBUG='20190902' + [ $PHPVERSION = '8.1' ] && XDEBUG='20210902' echo "[$PHP] 🐞 Xdebug path: $PHPDIR/pecl/$XDEBUG/xdebug.so" From 79ded94abbbe3d163866a2d70aec16c017344cf6 Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 13 Feb 2023 16:26:42 +0100 Subject: [PATCH 2/2] feat(php@8.1): update readme on how to use cli xdebug for php@8.1 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 36356fd..9b53122 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,8 @@ this time it will not accept connections. installed + PHPStorm is listening to connections. - Cli: Use `XDEBUG_CONFIG="" php -c /usr/local/etc/php/7.4/php-xdebug.ini bin/magento` +- Cli `php@8.1`: Use + `XDEBUG_SESSION=1 php -c /usr/local/etc/php/8.1/php-xdebug.ini bin/magento` - Tests: Create a local interpreter, the PHP version you're looking for should be suggested and add the `🐞 Xdebug path:` to enable xdebug (you should have seen that with the installation). The path is something like