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

Article Safiul Tarek

Problem:

Composer detected issues in my platform – PHP version 7.2.5 needs to be install

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


Solution 1:

I faced this problem using the new version of the composer.

This problem is related to a composer configuration when you run the command "composer install" if we need to work with the configuration we already have and don't want to make changes which could lead to other problems we should:

Step 1. Remove the packages you already have installed which includes this configuration from the composer

sudo rm -r vendor

Step 2. Run the command again with this flag: --ignore-platform-reqs

composer install --ignore-platform-reqs


Solution 2:

1. Add this line in config object of composer.json file

"platform-check": false

2. Run php artisan config:cache

php artisan config:cache

2. then run composer dump-autoload in terminal

composer dump-autoload


Solution 3:

Project or global composer.json file

{

"config": {

    "platform-check": false
 }
}


Thank you for reading the article. If you face any problem, please comment below.