when I check my PHP version it shows 8.0.3 but I changed the version to 7.2.0 in Laragon.
when I run the composer update command in Laravel it generates the error
Problem 1
- Root composer.json requires PHP ^7.2.0 but your PHP version (8.0.3) does not satisfy that requirement.
Problem 2
- laravel/framework[v5.8.0, …, 5.8.x-dev] require php ^7.1.3 -> your php version (8.0.3) does not satisfy that requirement.
- Root composer.json requires laravel/framework 5.8.* -> satisfiable by laravel/framework[v5.8.0, …, 5.8.x-dev].
2
Answers
This is a common problem in PHP because your PHP version does not match Laravel or the packages you use. Now it’s better to go to the composer.json file that says the last version you can have this way.
For example, in Laravel version 9, the minimum PHP version is 8.0.2
In your command line type:
press enter and then it will ask for the package
press enter and then it will ask for the version
press enter twice. Hope this helps.