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

casc-or's avatar

Frustrations Trying To Upgrade Project Laravel Version

I am struggling with trying to upgrade the Laravel version on a project. I am trying to put in the work to get to the current version but I've been stuck on this for days.

The production site started under 5.3, is running fine under 5.5.49 and has been for some time. However, each subsequent attempt at an upgrade breaks something or fails with some incompatibility between different packages and versions.

I use Forge and Digital Ocean VPS for production, I have a separate "staging" server there, and my local environment is Vagrant / VirtualBox / Homestead.

I have a running 5.8 branch but I am really leery of whether I have just managed to get it running through brute force and ignorance and there are inconsistencies or corruption in the install. I say that because trying to upgrade to 6.x has been completely unsuccessful.

When I change composer.json to "laravel/framework": "^6.0", remove my composer.lock file, and run composer update, I get an error that boils down to "laravelcollective/html[v5.8.0, ..., 5.8.x-dev] require illuminate/view 5.8" and "laravel/framework replaces illuminate/view and thus cannot coexist with it". So I remove the version on laravelcvollective/html, remove the composer.lock again, and rerun composer update.

I get "Upgrading laravelcollective/html (v5.8.1 => v6.2.1)" and a completed update.

I launch the site and get the welcome page. I can log in, but as soon as menus start to load I get errors like this "Missing required parameters for [Route: members.edit] [URI: members/{member}/edit]. (View: /resources/views/home.blade.php)"

Remembering that the site works fine under 5.8 here's the relevant line in home.blade.php

{!! link_to(URL::route('members.edit', ['id' => $user->id]), 'Edit Personal Info', ['id' => 'cancel-button', 'class' => 'btn btn-sm btn-info button150']) !!}

I've read through the upgrade notes and way down at the bottom there's a section titled Route URL Generation & Extra Parameters but I don't grasp anything there that points me at a solution.

I would appreciate any thoughts on two questions

What is my "Missing required parameters" error from and how can I correct it?

Is there something I'm missing in the upgrade process which would let me proceed more efficiently?

Thanks in advance

0 likes
4 replies
jlrdw's avatar

You have to follow each upgrade guide one at a time in the documentation.

All look up laravel shift.

Or start a brand-new application and migrate your controllers, views, models over.

And just to add, I have never had any major problems upgrading, but I followed that upgrade guide in detail.

casc-or's avatar

I actually used Laravel Shift to go from 5.3 -> 5.4 and 5.4 -> 5.5.

Nothing bad about Shift but what I found was much of the time was spent in sorting out package versions (e.g. Maatwebsite/Excel) which Shift does not do (and is understandably not meant to)

I followed the upgrade guide in detail for the 5.8 to 6.0 upgrade.

Since writing I've been stepping through code debugging and it would appear that when in my Controller.php I'm doing

view()->share('user', $this->user);

the user isn't getting to the route. I'm presently trying to figure out why that is.

Something which bears mention is that in my project I have created a Member class which replaces the User class. This is because of a requirement I have for members who have a unique username but can have duplicated email addresses between members. In the Auth I use the Member and then once authenticated In Controller.php I instantiate a user for the rest of Laravel to use

$this->user = Auth::user();

I'd thought about the "create a fresh project and copy everything over" but frankly that looked like it could have more issues. Plus I was concerned about implementing my custom Auth in a new version instead of upgrading something which works. Maybe not.

jlrdw's avatar

Well don't forget just for your information, even laravel 8 you can use the UI, or manual set up for Authentication so there should be no problem.

I usually upgrade, but when I looked at 8 at least for me it was easier starting with a fresh install, but just some thoughts on this.

chaudigv's avatar

@casc-or A while back I answered a similar question on what things to take care of when upgrading Laravel. Upgrading Laravel 5.0 to the latest version (7.x).

As others suggested, you will need to follow each version upgrade guide to be as specific as you can. Upgrading each composer package is a hassle and there's no shortcut to that. You will need to verify ther versions on packagist.org.

Please or to participate in this conversation.