I want to install Xdebug on my Mac with M1. I use PHP 7.4.32 because of the project I attend. I cannot switch the PHP version.
When I try to install Xdebug, it say's my PHP version has to update to 8.0.0 but I still want to use 7.4.32.
$ pecl install xdebug
> pecl/xdebug requires PHP (version >= 8.0.0, version <= 8.2.99), installed version is 7.4.32
No valid packages found
install failed
The current PHP version was installed with homewbrew.
$ brew services list
php none 19968 user ~/Library/LaunchAgents/homebrew.mxcl.php.plist
[email protected] started user ~/Library/LaunchAgents/[email protected]
[email protected] none
I run also brew update
command. Everything is fine.
How can I install Xdebug for PHP 7.4.32?
sudo pecl -d php_suffix=7.4 install <package-name>
where<package-name>
would bexdebug
. Or you can tell that pecl should target 7.4 by default for all operations with something likesudo pecl config-set php_suffix 7.4
– Warbler