Similar/same as: Your Composer dependencies require a PHP version ">= 8.1.0"
I'm using wsl. I've installed php8.1 using
sudo apt install php8.1 libapache2-mod-php8.1
...and I've uninstalled all versions of php except for 8.1 using:
sudo apt remove php8.0
...etc. I've then run:
update-alternatives --set php /usr/bin/php8.1
update-alternatives --set phar /usr/bin/phar8.1
update-alternatives --set phar.phar /usr/bin/phar.phar8.1
service apache2 restart
...and I've restarted wsl and yet, when I attempt to start sail:
./vendor/bin/sail up
I'm still getting the error:
Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.14.
Now then,
php -v
gives:
PHP 8.1.8 (cli) (built: Jul 11 2022 08:29:57) (NTS)
...and I've absolutely no idea where
You are running 8.0.14.
...is coming from! I think I've tried everything I can find to resolve this (except for overriding composer platform requirements - but something I'm using is expecting php8.1, so I don't really want to change it!)
Any help greatly appreciated
A.