close

[Solved] Composer detected issues in your platform: Your Composer dependencies require a PHP version 

Today I am trying to run composer install But It fails with this error: Composer detected issues in your platform: Your Composer dependencies require a PHP version in Laravel. In this Exerror article, We are going to learn about How to reproduce this error and we will discuss All Possible Solutions Let’s Get Start with This Article.

How Composer detected issues in your platform: Your Composer dependencies require a PHP version Error Occurs?

I am trying to run composer install But It fails with this error.

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0"

So here I am writing all the possible solutions that I have tried to resolve this error.

How To Solve Composer detected issues in your platform: Your Composer dependencies require a PHP version Error?

  1. How To Solve Composer detected issues in your platform: Your Composer dependencies require a PHP version Error?

    To Solve Composer detected issues in your platform: Your Composer dependencies require a PHP version Error First of all, Open your composer.json and add below line in config section of your composer.json: “config”: { “platform-check”: false } Now, You can run composer install command and it will execute successfully without any error. Thanks.

  2. Composer detected issues in your platform: Your Composer dependencies require a PHP version

    To Solve Composer detected issues in your platform: Your Composer dependencies require a PHP version Error You Just need to install composer with ignore platform check and it will ignore platform and then your error will be solved. First of all, open your terminal with the root of your laravel project and run this composer install command with –ignore-platform-reqs command just like this: composer install –ignore-platform-reqs And it will not check your platform and your composer install command will run successfully. Now, Your error is solved. Thank You.

Solution 1: ignore platform check

To Solve Composer detected issues in your platform: Your Composer dependencies require a PHP version Error You Just need to install composer with ignore platform check and it will ignore platform and then your error will be solved.

First of all, open your terminal with the root of your laravel project and run this composer install command with –ignore-platform-reqs command just like this.

composer install --ignore-platform-reqs

And it will not check your platform and your composer install command will run successfully. Now, Your error is solved. Thank You.

Solution 2: Edit composer.json

First of all, Open your composer.json and add below line in config section of your composer.json.

"config": {
    "platform-check": false
}

Now, You can run composer install command and it will execute successfully without any error. Thanks.

Conclusion

It’s all About this error. I hope We Have solved Your error. Comment below Your thoughts and your queries. Also, Comment below on which solution worked for you.

Also, Read

Leave a Comment