Categories
Programming

Composer detected issues fix (2024)

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.2.0”. You are running 8.1.18. in /Users/NAME/Documents/sites/worklist/vendor/composer/platform_check.php on line 24

To fix this issue, just do this:

brew unlink [email protected]
brew link [email protected]

composer global remove laravel/valet
composer global require laravel/valet

If you use Laravel Valet:

valet install
valet use [email protected]

That’s all. If it doesn’t work, just use this:

valet use [email protected] –force

It’s an update from my old blog post I wrote a year ago (facing similar problem, but different php version)