TALL Tales

Issues Upgrading to Laravel 9

25 Nov, 2021

On simple projects moving from Laravel 8 to 9 is fairly straightforward, follow the instructions for upgrading here and you should be fine: https://laravel.com/docs/9.x/upgrade.

The main changes will be in your composer.json (changes only shown):

"require": {
	"php": "^8.0.2",
	"laravel/framework": "^9.0"
},
"require-dev": {
	"spatie/laravel-ignition": "^1.0",
	"nunomaduro/collision": "^6.1",
},

Then you run composer update and away you go. But if you are running an early version of Laravel 8 you may find your composer update has problems.

Look to see if your "require" section has this:

"fideloper/proxy": "^4.4",

If so, remove it. Then go to app/Http/Middleware/TrustProxies.php and change Fideloper\Proxy\TrustProxies as Middleware to use Illuminate\Http\Middleware\TrustProxies as Middleware.

Then you can run composer update and you should be fine.