Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

trifek's avatar

Error when I try update Laravel to v10

Hi, I have problem with update my Laravel. I remove vendors and composer.lock.

My composer.json:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^8.1",
        "fideloper/proxy": "^4.4.2",
        "guzzlehttp/guzzle": "^7.5.0",
        "jeroennoten/laravel-adminlte": "^3.8.6",
        "kalnoy/nestedset": "^6.0.2",
        "laravel-lang/lang": "^12.18.5",
        "laravel/framework": "^10.3",
        "laravel/sanctum": "^3.2",
        "doctrine/dbal": "^3.0",
        "laravel/helpers": "^1.6",
        "laravel/tinker": "^2.8.1",
        "laravel/ui": "^4.2.1",
        "maatwebsite/excel": "^3.1.48",
        "spatie/laravel-permission": "^5.9.15",
        "yajra/laravel-datatables-oracle": "^10.3.1"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.6",
        "spatie/laravel-ignition": "^2.0",
        "fzaninotto/faker": "^1.9.2",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^6.1"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "files": []
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

I have on my server php 8.1

When I try: composer install I have error:

Your requirements could not be resolved to an installable set of packages.

Problem 1 - illuminate/contracts[v5.8.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.2.0-dev) does not satisfy that requirement. - illuminate/contracts[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.2.0-dev) does not satisfy that requirement. - illuminate/contracts[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.2.0-dev) does not satisfy that requirement. - illuminate/contracts[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.2.0-dev) does not satisfy that requirement. - Root composer.json requires fideloper/proxy ^4.4.2 -> satisfiable by fideloper/proxy[4.4.2]. - Conclusion: don't install laravel/framework v10.3.1 (conflict analysis result) - Conclusion: don't install laravel/framework v10.3.2 (conflict analysis result) - Conclusion: don't install laravel/framework v10.3.3 (conflict analysis result) - Conclusion: don't install laravel/framework v10.3.0 (conflict analysis result) - fideloper/proxy 4.4.2 requires illuminate/contracts ^5.0|^6.0|^7.0|^8.0|^9.0 -> satisfiable by illuminate/contracts[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev]. - Only one of these can be installed: illuminate/contracts[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev], laravel/framework[v10.3.0, ..., 10.x-dev]. laravel/framework replaces illuminate/contracts and thus cannot coexist with it. - Root composer.json requires laravel/framework ^10.3 -> satisfiable by laravel/framework[v10.3.0, ..., 10.x-dev].

How can I repair it?

0 likes
7 replies
LaryAI's avatar
Level 58

The error message indicates that some of the required packages have a minimum PHP version requirement that is not satisfied by the PHP version installed on your server. In this case, the required PHP version is lower than the version you have installed.

To fix this issue, you can either upgrade your PHP version to meet the minimum requirement or downgrade the required packages to versions that are compatible with your PHP version.

In this case, since you have PHP 8.1 installed, you can try downgrading the laravel/framework package to a version that is compatible with PHP 8.1. According to the error message, the highest version that is compatible with PHP 8.1 is v9.x-dev.

To do this, update your composer.json file to require laravel/framework v9.x-dev instead of v10.3:

"require": {
    ...
    "laravel/framework": "^9.0",
    ...
},

Then run composer update to update your dependencies.

If you still encounter issues, you can try removing the conflicting packages and their dependencies from your vendor directory and composer.lock file, then running composer install again.

Note that downgrading packages may result in compatibility issues with other packages or your application code, so it's important to thoroughly test your application after making any changes.

trifek's avatar

Yes, I have this results:

trifek@ukasz pp.dev % composer install --ignore-platform-reqs
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires fideloper/proxy ^4.4.2 -> satisfiable by fideloper/proxy[4.4.2].
    - Conclusion: don't install laravel/framework v10.3.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.3.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.3.3 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.3.0 (conflict analysis result)
    - fideloper/proxy 4.4.2 requires illuminate/contracts ^5.0|^6.0|^7.0|^8.0|^9.0 -> satisfiable by illuminate/contracts[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev].
    - Only one of these can be installed: illuminate/contracts[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev], laravel/framework[v10.3.0, ..., 10.x-dev]. laravel/framework replaces illuminate/contracts and thus cannot coexist with it.
    - Root composer.json requires laravel/framework ^10.3 -> satisfiable by laravel/framework[v10.3.0, ..., 10.x-dev].
Pegasus85's avatar

Hi @trifek,

I had the same problem with a webapp upgrading to Laravel 10. You'll need to check the third party packages in your app and make sure you have the right version for laravel 10.

In your case, I can see that fideloper/proxy is included in the framework from Laravel 9. See the information here: https://github.com/fideloper/TrustedProxy/issues/152

If you keep receiving error on some dependencies, take a look at the git repository for each package.

I hope it helps you.

Cheers!

1 like
GodziLaravel's avatar

@MallikharjunPuttam Hello I hade the same issue , could please tell me how did you solved it ?

 composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - illuminate/support[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.1.28) does not satisfy that requirement.
    - illuminate/support[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.1.28) does not satisfy that requirement.
    - illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.1.28) does not satisfy that requirement.
    - Root composer.json requires renatomarinho/laravel-page-speed ^2.1 -> satisfiable by renatomarinho/laravel-page-speed[2.1.0].
...

Please or to participate in this conversation.