TALL Tales

Home About Resources Reference Posts Contact

Issues Upgrading to Laravel 9

11 Feb, 2022

ERROR

LARAVEL

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.

Did this article help you? Say thanks by buying me a coffee!