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?
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.
PHP 8.0 is the undisputed champion with Laravel, while PHP 8.1 came in last.
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.
Server Requirements The Laravel framework has a few system requirements: PHP >= 5.4, PHP < 7. Mcrypt PHP Extension. OpenSSL PHP Extension.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With