PersonalHomePage's avatar

pros and cons between Laravel versions

I'm new to Laravel and so far it's been great. One thing I noticed is that different version of laravel can break stuff. How do you manage the switch from one version of Laravel to the other? Are new version of Laravel backwards compatible? What are some things to consider when deciding to change version or pick a version to use for the first time? Since I'm new and starting out I decided to pick v7.16 and the only draw back to it is the lack of tutorials. Should I always strive to use the latest version of Laravel?

0 likes
2 replies
mabdullahsari's avatar
Level 16

Answering in order:

  1. You have to go through the upgrade guide that gets released along with each major version (6 to 7 for example) and apply the needed breaking changes. You can also use automated upgrade systems such as JMac's Laravel Shift. Generally speaking for minor releases (7.x.x) for example) you do not have to do anything special as there shouldn't be anything breaking.

  2. Yes and no. Reason is answered in point numero uno. There will be breaking changes with each major release. But this does not mean your project will break every single major update because it depends on what parts of the framework you are using. YMMV

  3. If you are starting a fresh project, pick the latest release. No brainer. It will be the most mature and bug-free version of the framework.

  4. When looking up tutorials, do not care about the minor release tags, so the "x" in version 7.x.x let's say. You could be following a tutorial made during Laravel 6's time which is still perfectly valid and viable. Things don't change that often when set in stone. Try looking up information as close to the current version you are using as possible. So don't go and read on Laravel 4 or early versions of 5.

  5. Yes

Good luck!

Please or to participate in this conversation.