johncarmackfan95's avatar

Can't upgrade to laravel 10

I've been stuck on this and the upgrade guide has not been helpful. I would greatly appreciate insight into why I cannot upgrade to laravel 10 from 9.

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^8.1",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^10.0",
        "laravel/tinker": "^2.5",
        "laravel/ui": "^3.2",
        "laravelcollective/html": "^6.2"
    },
    "require-dev": {
        "pusher/pusher-php-server": "^5.0",
        "spatie/laravel-ignition": "^2.0",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^7.0",
        "phpunit/phpunit": "^10.0"
    },
    "autoload": {
        "files" : [ "app/helpers.php" ],
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}
composer install --ignore-platform-reqs
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install laravel/framework v10.0.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.0.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.0.3 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.1.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.1.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.1.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.1.3 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.1.4 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.1.5 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.2.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.3.0 (conflict analysis result)
    - 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.4.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.4.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.5.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.5.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.6.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.6.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.6.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.7.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.7.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.8.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.9.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.10.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.10.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.11.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.12.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.13.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.13.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.13.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.13.3 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.13.5 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.14.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.14.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.15.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.16.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.16.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.17.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.17.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.18.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.19.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.20.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.21.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.21.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.22.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.23.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.23.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.24.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.25.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.25.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.25.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.26.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.26.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.26.2 (conflict analysis result)
    - laravel/ui[v3.2.0, ..., v3.2.1] require illuminate/support ^8.0 -> satisfiable by illuminate/support[v8.0.0, ..., v8.83.27].
    - laravel/ui[v3.3.3, ..., v3.4.6] require illuminate/validation ^8.42|^9.0 -> satisfiable by illuminate/validation[v8.42.0, ..., v8.83.27, v9.0.0, ..., v9.52.16].
    - laravel/ui[v3.3.0, ..., v3.3.2] require illuminate/validation ^8.42 -> satisfiable by illuminate/validation[v8.42.0, ..., v8.83.27].
    - Only one of these can be installed: illuminate/support[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.26.2], laravel/framework[v10.0.0, ..., v10.26.2]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
    - Only one of these can be installed: illuminate/validation[v8.42.0, ..., v8.83.27, v9.0.0, ..., v9.52.16], laravel/framework[v10.0.0, ..., v10.26.2]. laravel/framework replaces illuminate/validation and thus cannot coexist with it.
    - Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0, ..., v10.26.2].
    - Root composer.json requires laravel/ui ^3.2 -> satisfiable by laravel/ui[v3.2.0, ..., v3.4.6].

From what I can tell, it refuses to install illuminate/framework because illuminate/support and illuminate/validation conflict. Yet my composer.json clearly isn't asking for illuminate/support or illuminate/framework. So I checked where this dependency was coming from.

composer why illuminate/support
fruitcake/laravel-cors  v2.2.0  requires illuminate/support (^6|^7|^8|^9)         
laravel/framework       v9.45.1 replaces illuminate/support (self.version)        
laravel/sail            v1.16.6 requires illuminate/support (^8.0|^9.0)           
laravel/tinker          v2.7.3  requires illuminate/support (^6.0|^7.0|^8.0|^9.0) 
laravel/ui              v3.4.6  requires illuminate/support (^8.82|^9.0)          
laravelcollective/html  v6.3.0  requires illuminate/support (^6.0|^7.0|^8.0|^9.0) 
spatie/laravel-ignition 1.6.2   requires illuminate/support (^8.77|^9.27) 

OK so does this mean I should be deleting laravel/tinker, laravel/ui, laravel-ignition, etc. even though I need these packages? Does this mean I can no longer use Tinker if I want to use Laravel 10?

Thanks for any help.

0 likes
5 replies
Snapey's avatar

Any packages that are causing a problem can be removed and then added back when you have resolved the conflicts.

LaravelUI (the main culprit here) is on version 4.2.2/ You have it pegged at 3.2

Either remove it then add back later, or try upgrade

1 like
johncarmackfan95's avatar

@Snapey This got me further. How did you know this was the issue? I would love to know how to debug this in the future. These errors are very cryptic to me.

Unfortunately it still doesn't work, but there is a smaller set of errors. This is confusing because when I upgraded from 8 to 9, it specifically wanted pusher-php-server ^5.0, but now that is the culprit stopping me from upgrading to 10...

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

  Problem 1
    - Root composer.json requires pusher/pusher-php-server ^5.0 -> satisfiable by pusher/pusher-php-server[v5.0.0, v5.0.1, 5.0.2, 5.0.3].
    - Conclusion: don't install psr/log 3.0.0 (conflict analysis result)
    - laravel/framework[v10.0.0, ..., v10.26.2] require monolog/monolog ^3.0 -> satisfiable by monolog/monolog[3.0.0, ..., 3.4.0].
    - monolog/monolog[3.0.0, ..., 3.4.0] require psr/log ^2.0 || ^3.0 -> satisfiable by psr/log[2.0.0, 3.0.0].
    - Conclusion: don't install psr/log 2.0.0 (conflict analysis result)
    - Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0, ..., v10.26.2].
Snapey's avatar
Snapey
Best Answer
Level 122

@johncarmackfan95 This line told me it was Laravel/UI that was the blocker

laravel/ui[v3.2.0, ..., v3.2.1] require illuminate/support ^8.0 -> satisfiable by illuminate/support[v8.0.0, ..., v8.83.27]

Your next error, the latest pusher server api is 7.2 so that is going to need an upgrade. I suggest you may need to seek out upgrade instructions for that as there may be breaking changes.

martinbean's avatar

@johncarmackfan95 The giveaway is this section:

laravel/ui              v3.4.6  requires illuminate/support (^8.82|^9.0) 

So that’s saying that laravel/ui v3.4.6 requires illuminate/support versions either ^8.82 or ^9.0.

Anything illuminate/* is a Laravel framework component. So Laravel 10.x uses illuminate/* ^10.0, Laravel 9.x uses illuminate/* ^9.0, and so on.

So if you’re trying to install Laravel 10, but then getting a package saying it only works with illuminate/<something> ^9.0, it means that package is only compatible with Laravel 9, and you should check to see if that package has a newer version that is compatible with Laravel 10.

Please or to participate in this conversation.