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

IDagel's avatar
Level 4

Issues Upgrading to Laravel 12

I have a fairly simple Laravel 11 project that I'm trying to upgrade to 12 and I'm getting the following error from Composer:

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

  Problem 1
    - Root composer.json requires laravel/framework ^12.0 -> satisfiable by laravel/framework[v12.0.0, v12.0.1].
    - Root composer.json requires php-flasher/flasher-laravel ^1.15 -> satisfiable by php-flasher/flasher-laravel[v1.15.0, ..., v1.15.14].
    - illuminate/support[v5.6.0, ..., v5.8.36] require php ^7.1.3 -> your php version (8.4.1) does not satisfy that requirement.
    - illuminate/support[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.4.1) does not satisfy that requirement.
    - illuminate/support[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.4.1) does not satisfy that requirement.
    - illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.4.1) does not satisfy that requirement.
    - php-flasher/flasher-laravel[v1.15.0, ..., v1.15.10] require illuminate/support ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 -> satisfiable by illuminate/support[v4.0.0, ..., v4.2.17, v5.0.0, ..., v5.8.36, 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.48.28].
    - php-flasher/flasher-laravel[v1.15.11, ..., v1.15.14] require illuminate/support ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 -> satisfiable by illuminate/support[v4.0.0, ..., v4.2.17, v5.0.0, ..., v5.8.36, 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.48.28, v11.0.0, ..., v11.44.0].
    - Conclusion: don't install laravel/framework v12.0.1 (conflict analysis result)
    - Only one of these can be installed: illuminate/support[v4.0.0, ..., v4.2.17, v5.0.0, ..., v5.8.36, 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.48.28, v11.0.0, ..., v11.44.0, v12.0.0, v12.0.1], laravel/framework[v12.0.0, v12.0.1]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
    - Only one of these can be installed: illuminate/support[v11.0.0, ..., v11.44.0, v12.0.0, v12.0.1], laravel/framework[v12.0.0, v12.0.1]. They all replace spatie/once and thus cannot coexist.

Here is my composer.json:

"require": {
        "php": "^8.2",
        "calebporzio/sushi": "^2.4",
        "guzzlehttp/guzzle": "^7.2",
        "laravel/framework": "^12.0",
        "laravel/pulse": "^1.3",
        "laravel/sanctum": "^4.0",
        "laravel/tinker": "^2.8",
        "league/flysystem-aws-s3-v3": "^3.0",
        "livewire/livewire": "^3.0",
        "livewire/volt": "^1.3",
        "meyfa/php-svg": "^0.14.7",
        "php-flasher/flasher-laravel": "^1.15",
        "spatie/laravel-medialibrary": "^11.0.0",
        "symfony/dom-crawler": "^7.0",
        "thiagoalessio/tesseract_ocr": "^2.13"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.9",
        "fakerphp/faker": "^1.9.1",
        "laravel/breeze": "^2.0",
        "laravel/pint": "^1.0",
        "laravel/sail": "^1.18",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^8.1",
        "phpunit/phpunit": "^10.1",
        "spatie/laravel-ignition": "^2.0"
    },

Can someone help me understand what's going on here?

0 likes
3 replies
LaryAI's avatar
LaryAI
AI
Best Answer
Level 58

The error you're encountering is due to a version conflict between the php-flasher/flasher-laravel package and the laravel/framework version 12. The php-flasher/flasher-laravel package, as specified in your composer.json, is compatible with Laravel versions up to 11, but not 12. Here's how you can resolve this issue:

  1. Check for Package Updates: First, check if there's a newer version of php-flasher/flasher-laravel that supports Laravel 12. You can do this by visiting the package's repository or Packagist page.

  2. Update the Package: If a compatible version exists, update your composer.json to require that version. For example, if version 1.16 supports Laravel 12, you would update your composer.json like this:

    "require": {
        "php-flasher/flasher-laravel": "^1.16",
        ...
    }
    
  3. Remove or Replace the Package: If no compatible version is available, you might need to consider removing the package or finding an alternative that supports Laravel 12.

  4. Run Composer Update: After making changes to your composer.json, run the following command to update your dependencies:

    composer update
    
  5. Verify Compatibility: Ensure that all other packages in your project are compatible with Laravel 12. You might need to update other packages as well.

  6. Test Your Application: After updating, thoroughly test your application to ensure everything works as expected with the new Laravel version.

By following these steps, you should be able to resolve the version conflict and successfully upgrade to Laravel 12.

farzinkhamushi's avatar

I have a same problem too i wanted to install lighthouse with laravel 12 . but i got the problem bellow . composer require nuwave/lighthouse ./composer.json has been updated Running composer update nuwave/lighthouse Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1 - Root composer.json requires nuwave/lighthouse * -> satisfiable by nuwave/lighthouse[v0.1.0, ..., v0.7.8, v1.0.0, ..., v1.1.0, v2.0.0, ..., v2.6.4, v3.0.0, ..., v3.7.0, v4.0.0, ..., v4.18.0, v5.0.0, ..., v5.72.0, v6.0.0, ..., v6.50.0]. - nuwave/lighthouse[v0.1.0, ..., v0.7.8, v1.0.0] require illuminate/support ^5.2 -> found illuminate/support[v5.2.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v1.0.1, ..., v1.1.0] require illuminate/console ^5.2 || ^5.3 -> found illuminate/console[v5.2.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v2.0.0, ..., v2.2.1] require illuminate/contracts ^5.4 -> found illuminate/contracts[v5.4.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v2.3, ..., v2.6.4] require illuminate/contracts 5.5.|5.6.|5.7.* -> found illuminate/contracts[v5.5.0, ..., v5.7.28] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v3.0.0, ..., v3.7.0, v4.0.0, ..., v4.1.1] require illuminate/contracts 5.5.|5.6.|5.7.|5.8. -> found illuminate/contracts[v5.5.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v4.10.0, ..., 4.11.0] require illuminate/contracts 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 -> found illuminate/contracts[v5.5.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v4.12.0, ..., v4.16.3] require illuminate/auth 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 -> found illuminate/auth[v5.5.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v4.17.0, ..., v4.18.0] require illuminate/auth 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 || ^8.0 -> found illuminate/auth[v5.5.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v4.2.0, ..., v4.9.0] require illuminate/contracts 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 -> found illuminate/contracts[v5.5.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v5.0.0, ..., v5.39.2] require illuminate/auth 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 -> found illuminate/auth[v5.6.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v5.40.0, ..., v5.70.3] require illuminate/auth 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 || ^9 -> found illuminate/auth[v5.6.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v5.71.0, ..., v5.72.0] require illuminate/auth 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 || ^9 || ^10 -> found illuminate/auth[v5.6.0, ..., v5.8.36, 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.48.28] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v6.0.0, ..., v6.35.0] require illuminate/auth ^9 || ^10 -> found illuminate/auth[v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.28] but these were not loaded, likely because it conflicts with another require. - nuwave/lighthouse[v6.36.0, ..., v6.50.0] require illuminate/auth ^9 || ^10 || ^11 -> found illuminate/auth[v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.28, v11.0.0, ..., v11.44.1] but these were not loaded, likely because it conflicts with another require.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require nuwave/lighthouse:*" to figure out if any version is installable, or "composer require nuwave/lighthouse:^2.1" if you know which you need. ...............................................................................................................................................................................................................then my composer.json file { "$schema": "https://getcomposer.org/schema.json", "name": "laravel/laravel", "type": "project", "description": "The skeleton application for the Laravel framework.", "keywords": [ "laravel", "framework" ], "license": "MIT", "require": { "php": "^8.2", "laravel/framework": "^12.0", "laravel/tinker": "^2.10.1" }, "require-dev": { "fakerphp/faker": "^1.23", "laravel/pail": "^1.2.2", "laravel/pint": "^1.13", "laravel/sail": "^1.41", "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.6", "phpunit/phpunit": "^11.5.3" }, "autoload": { "psr-4": { "App\": "app/", "Database\Factories\": "database/factories/", "Database\Seeders\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\Foundation\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "@php -r "file_exists('.env') || copy('.env.example', '.env');"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi", "@php -r "file_exists('database/database.sqlite') || touch('database/database.sqlite');"", "@php artisan migrate --graceful --ansi" ], "dev": [ "Composer\Config::disableProcessTimeout", "npx concurrently -c "#93c5fd,#c4b5fd,#fdba74" "php artisan serve" "php artisan queue:listen --tries=1" "npm run dev" --names='server,queue,vite'" ] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true, "php-http/discovery": true } }, "minimum-stability": "stable", "prefer-stable": true }

Please or to participate in this conversation.