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

18.4k Views Asked by At

i have enter image description herePHP 8.2.10-2ubuntu1 (cli) (built: Sep 5 2023 14:37:47) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.10, Copyright (c) Zend Technologies with Zend OPcache v8.2.10-2ubuntu1, Copyright (c), by Zend Technologies with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans

"require": {
        "php": "^8.2",
        "barryvdh/laravel-debugbar": "^3.7",
        "bensampo/laravel-enum": "^4.2",
        "fedeisas/laravel-mail-css-inliner": "4",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laminas/laminas-code": "^4.13",
        "laravel/framework": "^8.0",
        "laravel/passport": "^10.0",
        "laravel/telescope": "^4.3",
        "laravel/tinker": "^2.0",
        "laravel/ui": "^3.0",
        "laravelphp/officereade": "^1.0",
        "league/flysystem-aws-s3-v3": "^1.0",
        "maatwebsite/excel": "^3.1",
        "mews/captcha": "^3.2",
        "mjaschen/phpgeo": "^3.2",
        "mobiledetect/mobiledetectlib": "^2.8",
        "myfatoorah/laravel-package": "^2.0",
        "niklasravnsborg/laravel-pdf": "^4.1",
        "predis/predis": "^1.1",
        "propaganistas/laravel-phone": "^4.2",
        "spatie/laravel-permission": "^3.17",
        "twilio/sdk": "^6.11"
    },
    "require-dev": {
        "barryvdh/laravel-ide-helper": "^2.8",
        "facade/ignition": "^2.3.6",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3"
    },```
2

There are 2 best solutions below

0
stanley mbote On

I was experiencing the same issue and how I got to resolve mine was by switching to php 8.1 as I have multiple php versions installed.

At the time of the issue occurring my php version was 8.2.6.

My composer.json file php file was set at

require {
 "php": ">=7.3 || ^8.2.5",
  ....
  ....

After switching to php 8.1 I updated the php version in my comper.json to

require {
 "php": "8.1 || ^8.2.5",
  ....
  ....

and updated my dependencies in order to run using php version 8.1 using the command

composer update

and the issue was resolved on my end. Hope it helps someone too.

0
Bill Sar On

If this problem appear when you use valet-window from https://github.com/cretueusebiu/valet-windows, try to reinstall your valet-windows. I have met the same problem, and reinstalling the valet-windows solved it.