Upgrading laravel from 4.2 to 5.4 - laravel

I have a large project running on Laravel 4.2 and now I would like to upgrade it to the latest release (5.4)
On the upgrading guide I can see the steps to upgrade from each release to the next one, but the 4.2 to 5.0 requires a fresh install. Hence the question: should I install 5.4 (and fix problems) or 5.0 (running each upgrade)?
I'm possibily using any Laravel functionality, and have organized repositories for my own custom methods; I also need to maintain the database. I need to upgrade because I would like to use event bradcasting with Laravel Echo.
Thanks

To those looking for an answer: update directly to latest version, then fix changes along the way.
Explanation:
At first I tried to upgrade version by version; it was a pain. Every single vendor had different packages for each version and that caused issues even before correcting the code. I couldn't start fixing my code because the installation requirements of the vendors were failing at a certain point of the upgrade process.
Upgrading directly to latest version requires the correction of many things, but at least those are only related to your code. In my case I had to remove Sentry (authentication), Laravel OAuth, and some others I don't remember in favor of some native packages which I hope will be maintained properly. The upside of this approach is that once you have all the packages you need installed you can work directly on your code... which is what you have to do anyway.

Related

Can I use code splitting to migrate from an older version of Vuetify to a newer version?

We have a vue.js project in which we are using Vuetify 1.5.2. We want to upgrade to the latest version of Vuetify. Our first attempt to do this proved disastrous as it is an all-or-nothing move and as soon as we upgraded our version of Vuetify, everything across the site broke.
Now we are considering this again but we are looking at code splitting. What we are wondering is can code splitting be used to slowly migrate from Vuetify 1.5.2 to the latest version (2.3.19 right now)? Can we package our code in such a way that newer code is packaged the latest version of Vuetify but older code is packaged with the older version of Vuetify?
I'm afraid it will result in even more conflicts, and more time to ensure specific parts call the older version and some the newer. I'm afraid you will have to go the painful route of branching your project and slowly go through all the Vuetify issues.
Unless your front-end consists of multiple independent projects (each with their own package.json), then it could be done.

How I could upgrade Grails 2.2.4 version to latest or most current version?

I'm working with a Grails application version 2.2.4 and I need a procedure for upgrade to latest version (I hope it can be possible). I have thought as a first step to follow the indications of the official site, but that let me to upgrade to version 3.
I'd like to know if anyone already did it or have experience about that. How long take it?, the process and the main problems.
Many thanks in advance.
I think you need to follow both upgrade instructions. the one for 3.x and the 4.x.
start with the 3.x and them move to the 4.x changes.
Another approach I think may be better is to start an empty 4.x application and then start moving you code there. also check first that all the plugins that you are you sing have 3+ version.
The effort required to upgrade can change massively depending on multiple factors, including the size of the project, the quality of the original code, were plugins used and if so have they been updated or will the functionality need replacing, were deprecated taglibs used, e.g remoteFunction etc. etc.
There is not a great deal of difference between 3.x and 4.x so it makes sense to upgrade to 4.x.
Tackle it in stages from the basis of a new project, attempting to rebuild the project between stages.
Reestablish configuration, you don't have to use application.yaml (the default in 4.x) so can create an application.groovy with the same parameters as per your old project.
Move over domain objects but use a new database URL, compare the schema's between the old db and new db to ensure the database is the same. Unless you don't rely on GORM to recreate/update the schema.
Move over any other source and command objects ensuring the project will build. You may need to modify buildconfig at this stage to bring in dependencies and plugins.
Move over services, ensure all compiles and make sure transactions are behaving as intending.
Move over controllers ensuring any tests run successfully.
Move over the views.
Hopefully if the project is still building at this stage, you can run it!

Is there a safe way to upgrade the laravel version in Production

I have a Laravel 5.4 project (web application), it's a huge product. I want to add some well known packages like error logging and debugging. Is there any simple way to update the Laravel from 5.4 to 5.5 or 5.6 without affecting the things what was already done? How can I do this?
You should never upgrade your production environment directly without testing. It would be better to set up a staging environment and test the upgrade there. If you don't have any problems there, consider upgrading the production environment.
If you want to know all changes from older versions to newer versions, check the upgrade guides in order:
https://laravel.com/docs/5.5/upgrade
https://laravel.com/docs/5.6/upgrade
https://laravel.com/docs/5.7/upgrade

Can I downgrade from Laravel 5.5 to 5.4

I want to upgrade my application from 5.4 to 5.5, at first I was totaly fine with working 5.4 but now it seems like I can really make use of the new errors page. I've seen some other changes going on too and I wonder if I upgrade it from 5.4 to 5.5 and if something goes wrong, what options do I have. The project is saved in a private repository, I know I probably have a chance to go back to previous versions easly, but after doing development in 5.5, am I gonna be in a deadend for solutions?
I suppose you are using GIT for SVN. Then just create a separate branch from master and upgrade and test it for a few days and if everything works fine then pull on production. Also, maintain a 5.4 branch for few days if you want to revert back. But it's very rare you will face any problem on 5.5 if you migrate correctly with through testing.

Can I upgrade Laravel from version 5.0 directly to 5.2?

I have a site built in Laravel 5.0 and would like to upgrade to Laravel 5.2
Do I have to first upgrade to 5.1 and then upgrade to 5.2 or is it possible to upgrade directly from 5.0 to 5.2
The only guides I can find at the moment don't seem to offer the option from 5.0 to 5.2 so I was wondering if there are too many changes to jump from 5.0 directly to 5.2.
Since the migrations between releases is a manual migration, you may follow the instruction for every single migration in chronological order and then run the composer update only once.
Nevertheless, I think the optimal approach is to migrate to the next version, verify everything works, and repeat until you get to the last release.

Resources