I am geeting error when trying to install laravel 7 using php version 8. Is there any way i can solve this issue.
2
-
2There is, but you should not. There is a reason the install is blocked. Some functionality will not work. Why don't you just install the latest version of Laravel.Gert B.– Gert B.2021-09-21 13:20:15 +00:00Commented Sep 21, 2021 at 13:20
-
1• Welcome to StackOverflow! Please avoid uploading code as an image. meta.stackoverflow.com/questions/285551/…nima– nima2021-09-22 13:35:40 +00:00Commented Sep 22, 2021 at 13:35
Add a comment
|
1 Answer
This message is telling you that no version of Laravel is available for the given version constraint (^7.0) and your PHP version.
Said otherwise all Laravel version from the 7.0 to the latest 7.x (^7.0) aren't compatible with your PHP version (which is probably too old).
You could also have missing extensions that are required by Laravel.
Three options here:
- You try to fix those version problems and try again.
- You bypass Composer checks by using the
--ignore-platform-reqsflag:composer create-project --ignore-platform-reqs laravel/laravel:^7.0 blog. Composer will ignore the "platform requirements" and will install Laravel, however it might not work well. - You remove the version constraint and Composer will install the latest compatible Laravel version (if there is one, it depends on your extensions):
composer create-project laravel/laravel blog.
You can check the PHP version by doing php --version, Laravel 7 requires at least PHP 7.2.
