I created a Laravel 5.1 web app in 2015 and now I would like to upgrade it to the latest version.
The problem is that, after reading the 5.1-to-5.2, 5.2-to-5.3 and 5.3-to-5.4 guides, I realized that this would be a lot of work!
I am now then considering waiting for the 5.5 release as it will be a LTS one (like the 5.1 was).
My question is then: will the Laravel guys create a 5.1-to-5.5 guide, which would make a lot of sense since many people will want this upgrade (from LTS to LTS)?
It will probably be simpler to start from a fresh 5.5 new install and to import our controllers, models, views and config files to the new version. But Laravel should then provide us a guide listing all of the possible fails.
I haven't seen any information about this from Taylor Otwell, but you might have a better chance of getting that question answered by opening an issue on Github or contacting them on Twitter.
Depending on project, I prefer to create a new project and move over the code..
I have spent much of the last 6 months upgrading various Laravel projects from 5.1 and 5.2.
After a couple of truly frustrating upgrades I now always start from a fresh install of the version I am upgrading to. Shift is very good and a real time saver but it does mask what's happening under the bonnet. Likewise, just updating composer and running composer update on the same app tends to hide the changes (and always caused bugs for me).
By starting with a fresh install - and moving over your code step by step - you see first hand what all the changes are between each version. This then lets you:
Not carry over redundant code, files and directories from your old version. For example L5.3 did away with a bunch of default directories such as listeners, policies, jobs (if I recall correctly). If you have a project that never used them - then just upgrade - you often carry over these things in the upgraded version.
It forces you to properly notice and take advantage of new features in Laravel. Many things in your old App will carry on working in your new version if you just run a composer update. Which means you can often miss out on things that you could be taking advantage on to improve things. For example:
Way better emailing in 5.3 and 5.4. I couldn't help but notice my old Emailing set up was pants compared to using the new Mailable class
Easier image upload
took all of about 45minutes to quickly swap to this during the upgrade
It give you a chance to clean up and improve your code. Moving everything over to a new install is like one giant code review. For example the separation of routes in L5.3 into different files is another really good feature. You could have just kept one route file but taking the time to break apart your old route.php file gives you the opportunity to greatly improve a big app say.
Anyway - just some thoughts. Probably only relevant if you have the time and budget for a big upgrade.
T. Otwell kindly took the time to answer me and here is his answer: "No I don’t think there will be a 5.1 to 5.5 guide. You would just follow the guides in order."
I wonder if you could provide a few more hints on the 5.5 - 'fresh start' ?
I am thinking about creating a new fresh install of Laravel, then moving all the controller folders right into the 5.5 install, then going through the config files, updating them, then looking at any trickier bits like Eloquent changes, etc. Or is it better to do things piecemeal?
Our app is not all that small, but it does not attempt to do a lot of Laravel specific stuff, so I am hoping that moving controller and view folders + a week of work might do it.