Laravel Semantic Versioning Meaning

Laravel recent major changes #1, composer update laravel

In order to upgrade Laravel framework you should consider some facts, I will wrap them in a series.

Laravel recent major changes #1:

Laravel starts following Semantic Versioning. Major framework releases include breaking changes while minor and patch releases should never contain breaking changes.

When referencing the Laravel framework or its components from your application or package, you should always use a version constraint such as ^6.0, to avoid upgrading to major releases of Laravel which do include breaking changes.

It means if you open composer.json file, you see something like this:

Focus to this line:

note: I create this project some months ago.

Now I do upgrading Laravel framework by composer update command :

It will upgrade the laravel framework to the recent non-breaking version lower than Laravel 7.0 because of the caret ^ sign you see in the composer.json file.

Upgrading laravel process happens as below:

While after this upgrade I see the composer.json file is still untouched.

Let’s check the new installed Laravel version by artisan command:

I recommend always run this command:

Learn more here.

Totally when we say:

It means the minimum accepted version is 9.1.3 and lock on the 9 (the first digit) and then let the composer to increase the other following digits.

Written by

Web geek, Self-taught full-stack web developer, Learning Python, Laravel, Vuejs, UX/UI design, Nuclear Physicist PhD

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store