Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I update my Laravel 4 application to Laravel 5 or create a new Laravel 5 application

I've got a couple of Laravel 4 applications that I want to upgrade to Laravel 5. Normally I would use the Laravel docs upgrade guide to achieve an upgrade to the next version.

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

Taylor has said publicly that he thinks the better process is actually to start from scratch and copy your code in.

So my question is what should I do, should I update my Laravel 4 application to Laravel 5 or create a new Laravel 5 application and copy/port my whole codebase into it?

like image 595
0x1ad2 Avatar asked Apr 30 '15 11:04

0x1ad2


People also ask

Which version of Laravel should I use?

While Laravel 7 and 8 will both stop receiving updates in 2021, Laravel 6 is a long-term support version and will include security fixes until September 2022. So, if you're upgrading or starting a new Laravel application, you should weigh your options for user authentication before you select one.

Which PHP version is best for Laravel?

PHP 8.0 is the undisputed champion with Laravel, while PHP 8.1 came in last.

Can I upgrade Laravel 5.8 to 8?

By default, Laravel 5.8 uses PHPUnit 7. However, you may optionally upgrade to PHPUnit 8, which requires PHP >= 7.2. In addition, please read through the entire list of changes in the PHPUnit 8 release announcement.

Which PHP version is required for Laravel 5?

Server Requirements The Laravel framework has a few system requirements: PHP >= 5.4, PHP < 7. Mcrypt PHP Extension. OpenSSL PHP Extension.


1 Answers

The official documentation recommends creating a project from scratch:

The recommended method of upgrading is to create a new Laravel 5.0 install and then to copy your 4.2 site's unique application files into the new application.

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

To be honest, from my experience, it is quite difficult to upgrade to 5.0. There are lots of namespace issues if you already have used them throughout your projects so prepare for a lot of work.

Update

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

like image 200
Crembo Avatar answered Sep 25 '22 06:09

Crembo