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

davidleads's avatar

Upgrading VERY old laravel to the latest version.

So, there's some project we abandoned in our company about 2.5 years ago, and now we are willing to get it back. Here's the output of the --version command..

local$ php artisan --version
Laravel Framework 5.6.38

As you can see, it wasn't updated for a long time, and we are wondering what will be the best and fastest approach to upgrade it and make it use the last laravel (8.x.x) version available. From what I already saw - it might be even faster to actually create a new project and gradually copy chunks of code into it.

0 likes
7 replies
faraz73's avatar

@MichalOravec look really smooth & easy, But nope it is not ... specially on updating 3rd party packages.

martinbean's avatar

@davidleads It’s impossible to say without knowing how “big” the project is.

If you do go the upgrade route, then be sure to upgrade version by version; don’t try and go straight from 5.x to 8.x, otherwise you’ll have a bad time and will probably be left with no option but to start over!

davidleads's avatar

https://laravel.com/docs/5.7/upgrade (Estimated Upgrade Time: 10 - 15 Minutes)

"...Next, examine any 3rd party packages consumed by your application and verify you are using the proper version for Laravel 5.7 support..."

how can you say this process takes 15-20 minutes if you don't know the number of my 3rd party packages? i mean.. if i must go over 30-40 packages now to check compatibility, one-by-one.. wouldn't it take me much more than these 15-20 minutes?..

Snapey's avatar

@faraz73 start a new project on the latest release and copy all your app code across. If you are coming from 5.x you will find that the latest versions of packages require php8 so you wont be able to install them with Laravel 6 and 7 as you pass through each version

2 likes

Please or to participate in this conversation.