Upgrade from Laravel 4.1 to directly Laravel 5.3 - laravel

I have an app which was developed 3-4 years back in Laravel 4.1 and as per the current need I've been asked to port the web application written in Laravel 4.1 to current stable and recent version of Laravel 5.3 directly (without stepwise upgrade to 4.2/5.0/5.1 or 5.2). Is it better to port which may take a lot of time due to architectural change difference or rewrite everything from scratch in the latest Laravel 5.3 version?
Thank you,
Rohit

Depending on the size of your application, it may be easier to just create a new 5.3 application and copy over your files and making the necessary modifications as you go.
There would be no way to just directly upgrade from 4.1 to 5.3 - you'd have to do all the steps in between in some manner.

Related

magento 2 and laravel not support due to different php version

I had a simple query but don't know how to work on it, I am working on two Different Project one is in Laravel 5.6 and other is in Magento 2.1. Now my problem comes when i am trying to install both on the same server because my Laravel support PHP 7.1 and i am using a theme Magento(Porto) which support 7.0.
I want to know how to install both on my server. I have already a built side of Laravel. I had to check some google it gives me multiple PHP version related help. but how to implement it.
Thanks
I am not sure which development server you are using at your local machine. However, you can have more than one PHP version.
You can switch between versions. Refer below.
Perhaps, this may help you.
Multiple PHP versions in Wamp under Windows 7
If you are using Ubuntu try below,
https://www.tecmint.com/install-different-php-versions-in-ubuntu/

Laravel Update 4.1.24 to 4.2

im currently working on an update from laravel 4.1.24 to 5.6 The problem is i got nearly no experience with laravel. My question is now, how do i properly upgrade. Should i first upgrade to 4.2 and then to 5.0 and so on or would it be better to upgrade directly to 5.6 and how should i do this? I mean there are so many changes that i think i could miss something.
Also the project is just in a github repository, so it's hard to check if it's still working after an upgrade because i dont got the old modules. Or would it be enough to go on laravelshift. com and just upload it there to go from 4.1 to 4.2, 4.2 to 5.0 and so on.
Best regards!
The Laravel documentation contains a whole list of breaking changes that can help you to upgrade your application to a newer version. Laravel Shift is a service that checks and updates these changes in your project.
However, there is no way of being sure that your project will still work after these upgrades. Especially if you are using external modules its very risky.
If it is not required, I would not recommend upgrading from 4.1.x to 5.6 unless you have a lot of time on your hands. A solution could be to set up a completely new 5.6 project and add the project code file by file and test the implementations.
Start from here and follow instructions to upgrade it to 4.2. Then go through your packages and update their versions accordingly. When done use dropdown list in the top-right corner to select next version (5.0) and repeat it until you are at 5.6.
You definitely need to be able to run your code and test it somehow after each step because there will be problems. From 4.1 to 5.6 is a big leap and a lot of packages might have breaking changes etc. I only migrated as far as from 5.1 to 5.6 and it took me whole day to fix everything.
As for automated upgrade you can try it as well, but as I already mentioned you need to be able to test your work because all packages need to be updated as well.

I'd like to upgrade to Laravel 5.5 from Laravel 5.1

I'm using Laravel 4.2. I have checked Laravel document about upgrading.(https://laravel.com/docs/5.5/upgrade)
But, my question is, does Upgrading have to be done step by step?
For Example,
Ver 4.2 ⇒ 5.0 ⇒ 5.1 ⇒ 5.2 ⇒ 5.3 ⇒ 5.4 ⇒ 5.5
Or, Can it directly upgrade to Laravel 5.5 From 4.2?
In your case going from 4.2 to 5.5 may be a bit hard .
Considering that the major breakpoints of laravel are laravel 5.0 and laravel 5.4 you should split the process in 2 steps .
1)Going from 4.2->5.0 means a big refactor on laravel's controller and ORM.
2) 5->5.5 comes up with new laravel features that helps you re-organize your code or provides new stuff .
So either you should make an initial reform and then look for laravels 5++ features or you should start the project from scratch
You can upgrade files directly to the latest version anytime, that can be done with any software.
However between major versions there are backwards compatibility breaking changes that surely will affect your code so you must follow upgrade notes for every version. And because Laravel does not adhere to the standard called SemVer, there's a lot of work ahead of you, because there are BC breaking changes in the minor versions as well.
For instance, if SemVer was respected (like in Symfony, Zend Framework, etc.) you would only need to read one upgrade note (from v4 to v5).

Upgrading to Laravel 5.4.0 from 5.1

I am using Laravel 5.1 and I would like to know how to upgrade to the latest version of Laravel which is 5.4.
Can we directly upgrade to Laravel 5.4 From 5.1 ?
The best way to upgrade is to follow the steps for each version. So upgrade to 5.2 then 5.3 then finally 5.4. The upgrade guides look lengthy but it most cases it wont take to much time because the guide covers all potential changes but they won't all apply to your application.
Alternatively you could install a fresh version of 5.4 then copy your application code into the new Laravel. Since the upgrade for each version is relatively straight forward and this method would lose your git history I wouldn't recommend it.
Another paid method would be to use Laravel Shift which will automate the upgrade process for you.
Edit: As #Scott mentioned you should make sure your server meets the server requirements for your target Laravel version. Specifically make sure you have PHP >= 5.6.4 installed
Well, you first you need to update your composer.json file. Around line 9, you should be requiring in the framework itself. Change that to use version 5.4.*. After that, run a composer update and then, yes, you do need to go through your files manually to address any incompatibilities.
after you replace provider folder to the new version.
https://github.com/laravel-shift/laravel-5.4/tree/master/app/Providers.

How to upgrade from Laravel 4.2 to 5?

How do I upgrade from Laravel 4.2 to 5 dev?
Yes, I have read the documentation but it doesn't help. What I've done so far is updated the composer.json and then I ran composer update --no-scripts.
But the file structure seems to be the same...
Would it be easier to just do a fresh install and move files and code over manually?
Laravel 5 is not even in Beta yet.
Once it is available for use - Taylor will provide a structured upgrade process to move from 4.2 to 5.
In the meantime, you should be careful about using Laravel 5 - as the structure is changing almost daily, so Taylor does not recommend using it in projects yet.
Edit: Laravel 5 has now officially been released. Here is the official upgrade guide.

Resources