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

garrettmassey's avatar

Upgrading from Laravel 6.x to 7.x using Shift, composer-update fails and app crashes.

An app I am working on is running on Laravel 6, and our servers are going to be removing older versions of PHP at the end of the year, so we are in the process of updating the app to Laravel 8 over the course of this year so we can keep up to date with PHP and eventual Laravel updates.

After reviewing multiple ways to update the application, which we have never done before, we decided to go with Laravel Shift to update from 6.x to 7.x. The problem is that when we run composer update we get the following error:

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 laravel/horizon ^4.3 -> satisfiable by laravel/horizon[v4.3.0, ..., 4.x-dev].
    - laravel/horizon[v4.3.0, ..., 4.x-dev] require php ^7.2 -> your php version (8.0.15) does not satisfy that requirement.

I have tried re-installing Laravel/Horizon using composer require laravel/horizon but that gives me this error:

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

 Problem 1
- Root composer.json requires diglactic/laravel-breadcrumbs ^7.1 -> satisfiable by diglactic/laravel-breadcrumbs[v7.1.0, v7.1.1].
- Root composer.json requires laravel/horizon ^5.9 -> satisfiable by laravel/horizon[v5.9.0, 5.x-dev].
- Conclusion: don't install laravel/framework v7.29.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.29.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.29.3 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.30.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.30.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.30.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.30.3 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.30.4 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.30.5 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.30.6 (conflict analysis result)
- laravel/horizon[v5.9.0, ..., 5.x-dev] require illuminate/support ^8.17|^9.0 -> satisfiable by illuminate/support[v8.17.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev].
- Only one of these can be installed: illuminate/support[dev-master, v1.0.0, v1.1.0, v1.1.1, v1.1.2, v4.0.0-BETA2, ..., 4.2.x-dev, 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], laravel/framework[v7.29.0, ..., 7.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- diglactic/laravel-breadcrumbs[v7.1.0, ..., v7.1.1] require laravel/framework ^6.0 || ^7.0 || ^8.0 || ^9.0 -> satisfiable by laravel/framework[v7.29.0, ..., 7.x-dev].
- Conclusion: don't install laravel/framework v7.29.0 (conflict analysis result)

You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/horizon:*" to figure out if any version is installable, or "composer require laravel/horizon:^2.1" if you know which you need.

I have tried installing specific versions of Horizon but I end up running into other composer errors, and I'm stuck.

the composer.json looks like this:

{  
  "name": "laravel/laravel",  
  "type": "project",  
  "description": "The Laravel Framework.",  
  "keywords": [  
	  "framework",  
	  "laravel"  
  ],  
  "license": "MIT",  
  "require": {  
	  "php": "^7.2.5|^8.0",  
	  "phpunit/phpunit": "^8.5.8|^9.3.3",  
	  "barryvdh/laravel-dompdf": "^1.0",  
	  "barryvdh/laravel-snappy": "^1.0",  
	  "diglactic/laravel-breadcrumbs": "^7.1",  
	  "fideloper/proxy": "^4.4",  
	  "geocodio/geocodio-library-php": "^1.3",  
	  "giggsey/libphonenumber-for-php": "^8.12",  
	  "google/analytics-data": "^0.8",  
	  "google/apiclient": "^2.12",  
	  "guzzlehttp/guzzle": "^7.2",  
	  "h4cc/wkhtmltoimage-amd64": "0.12.4",  
	  "h4cc/wkhtmltoimage-i386": "0.12.x",  
	  "h4cc/wkhtmltopdf-amd64": "0.12.4",  
	  "h4cc/wkhtmltopdf-i386": "0.12.x",  
	  "haruncpi/laravel-maintenance": "^1.0",  
	  "ixudra/curl": "^6.22",  
	  "jenssegers/agent": "^2.6",  
	  "knplabs/knp-snappy": "^1.4",  
	  "laravel/framework": "^7.29",  
	  "laravel/helpers": "^1.5",  
	  "laravel/horizon": "^4.3",  
	  "laravel/tinker": "^2.5",  
	  "laravelcollective/html": "^6.3",  
	  "maatwebsite/excel": "^3.1",  
	  "predis/predis": "^1.1",  
	  "propaganistas/laravel-phone": "^4.2",  
	  "protoqol/prequel": "^1.22",  
	  "pulkitjalan/google-apiclient": "^4.1",  
	  "spatie/db-dumper": "^3.1",  
	  "spatie/laravel-activitylog": "^3.17",  
	  "spatie/laravel-analytics": "^4.0",  
	  "spatie/laravel-permission": "^5.5",  
	  "spatie/opening-hours": "^2.11",  
	  "twilio/sdk": "^6.34",  
	  "yajra/laravel-datatables": "^1.5",  
	  "laravel/ui": "^2.5",  
	  "fruitcake/laravel-cors": "^2.0"  
  },  
  "require-dev": {  
	  "phpunit/phpunit": "8.*",  
	  "barryvdh/laravel-ide-helper": "v2.8.2",  
	  "facade/ignition": "^2.0",  
	  "mockery/mockery": "^1.3.1",  
	  "nunomaduro/collision": "^4.3",  
	  "fakerphp/faker": "^1.9.1"  
  },  
  "config": {  
	  "optimize-autoloader": true,  
	  "preferred-install": "dist",  
	  "sort-packages": true,  
	  "platform-check": false  
  },  
  "extra": {  
	  "laravel": {  
		  "dont-discover": []  
	} },  "autoload": {  
	  "psr-4": {  
	  "App\": "app/"  
	 },  
  "files": [  
	  "app/helpers.php",  
	  "app/Helpers/ArrayHelper.php"  
  ],  
  "classmap": [  
	  "database/seeds",  
	  "database/factories",  
	  "app/Models"  
  ]  
 },  "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'm at a loss for what to do to get the app running in Laravel 7. If we can get it running in Laravel 7 we will use Shift again to upgrade to v8 to buy ourselves more time on LTS for our servers with PHP.

Any ideas on what I'm doing wrong?

0 likes
8 replies
Sinnbeck's avatar

Try removing the vendor directory and do a clean composer install

garrettmassey's avatar

@Sinnbeck Removing Horizon from composer.json and then removing the HorizonServiceProvider.php from the config seems to have worked. I'm running some tests now

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@garrettmassey great. Then you at least have a working base. Now you can try composer update and then composer require laravel/horizon "^4.0"

1 like
garrettmassey's avatar

@Sinnbeck Changing my required PHP version to ^7.2||^8.0 and then running composer require laravel/horizon:^4.0 finally worked like a charm! Thank you!

wingly's avatar

Take them one by one and start fixing them. Probably you need to update multiple dependencies. Start for example with horizon then the next one that fails etc.

Please or to participate in this conversation.