1

I am working with a laravel framework and use composer to install a specific version of packages but I am getting an error form composer as following

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.12". You are running 7.3.11. in /Users/mac/Documents/laravel_projects/covid_site/demo_1/vendor/composer/platform_check.php on line 24

but when I run php info from xampp it says my php version is 8.0.2 as following image enter image description here

how I can solve this issue ?

I am using mac OS

Mokhtar Ghaleb
  • 423
  • 13
  • 26

1 Answers1

0

Probably you have two different php version for your setup. The webserver uses a different version than your CLI.

To verify the behavior type php --version. Is the output not the desired php-version check your global $PATH variable.

echo $PATH # for linux/macos
echo %PATH% # for winodws

Maybe you see the path to your old version here.

To fix this issue just replace the old php path with your newer one.

Markus
  • 1,909
  • 4
  • 26
  • 54