skip to Main Content

When I send a request from postman to my server I get this message as a response:

Composer detected issues in your platform:

Your Composer dependencies require a PHP version ">= 7.3.0".

I have tried every single solution I have found but nothing has changed.

My composer.json looks like this:

"require": {
    "php": "^7.3|^8.0",
}
"config": {
    "platform": {
        "php": "7.3.0"
    }
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "platform-check": false
},

2

Answers


  1. You have already written "platform-check": false. It should work.

    Try to use >= or double Pipe || or try the below command

    composer install --ignore-platform-reqs
    

    https://getcomposer.org/doc/articles/versions.md#version-range

    –ignore-platform-reqs: ignore all platform requirements (php, hhvm, lib-* and ext-*) and force the installation even if the local machine
    does not fulfill these. See also the platform config option.

    https://getcomposer.org/doc/03-cli.md

    Update :

    After running above command, run below commands in terminal:

    1. php artisan config:cache

    2. composer dump-autoload

    Login or Signup to reply.
  2. had same problem. had php7.4, 8.0 n 8.1

    this is what worked for me:

    php8.1 /usr/local/bin/composer install --ignore-platform-reqs

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search