Should I upgrade my Laravel 4 app to Laravel 5 or create a new Laravel 5 app

I have several Laravel 4 applications that I want to upgrade to Laravel 5. I usually use the Laravel docs upgrade guide to get the upgrade to the next version.

But earlier today I read a blog post from Matt Stauffer that says the following:

Taylor has publicly stated that he believes that the best process is actually starting from scratch and copying the code.

So my question is: what should I do, should I upgrade my Laravel 4 application to Laravel 5 or create a new Laravel 5 application and copy / migrate my entire code base?

+6
source share
3 answers

In the official documentation, it is recommended to create a project from scratch:

The recommended upgrade method is to create a new Laravel 5.0 installation, and then copy your unique 4.2 application files to the new application.

from http://laravel.com/docs/5.0/upgrade#upgrade-5.0

Honestly, in my experience, it's pretty hard to upgrade to 5.0. There are many problems with the namespace if you have already used them in all projects, so get ready for a lot of work.

Update

Although this is not directly related, if you plan to upgrade to Laravel 5.0, note that the HTML and Form helpers HTML now gone and moved to a separate package: http://laravelcollective.com/docs/5.0/html

+4
source

Just set up your new Laravel 5 app.

Try to understand the structure of the new folder and that’s it. Check out the Laravel 5 docs and play with the project for hours.

Then follow this documentation. Copy the files one at a time. Move in order of route, controller, helpers, packages, views.

+1
source

I agree with Taylor. Installing the new Laravel 5 avoids many possible errors. Later you copy your controllers, views, etc. To fix the places, then make the necessary changes.

-2
source

Source: https://habr.com/ru/post/986294/


All Articles