For testing purposes I installed an old version of PHP (7.1). through brew.
Then I ran valet use [email protected] which worked.
But then I wanted to switch back to PHP 7.4 by using valet use [email protected] and got the following error.
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.9". You are running 7.1.33. in /Users/example/.composer/vendor/composer/platform_check.php on line 24
Then I tried to reset the Valet installation by running composer global update and valet install, or running composer global update and valet uninstall --force
But nothing worked.
When running composer global update I got the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer[v3.0.0, ..., v3.0.1] require php ^7.2 -> your php version (7.1.33) does not satisfy that requirement.
- laravel/installer[v3.1.0, ..., v3.2.0] require php ^7.2.9 -> your php version (7.1.33) does not satisfy that requirement.
- Root composer.json requires laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1, v3.1.0, v3.2.0].
Now I even get an error when trying to force uninstall Valet with valet uninstall --force:
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.9". You are running 7.1.33. in /Users/example/.composer/vendor/composer/platform_check.php on line 24
I'm stuck. What can I do?