Laravel Semantic Versioning Meaning

Laravel recent major changes #1, composer update laravel

Panjeh
2 min readNov 4, 2019

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:

"laravel/framework": "^6.0",

note: I create this project some months ago.

Now I do upgrading Laravel framework by composer update command :

composer update laravel/framework

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:

php artisan --versionAt this moment I see:Laravel Framework 6.4.1

I recommend always run this command:

composer diagnose

Learn more here.

Totally when we say:

^9.1.3

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.

I would like to introduce two packages for Laravel that I have recently developed: Laravel Pay Pocket, a modern multi-wallet package, and Laravel Failed Jobs, a UI for the Laravel Failed Jobs Table. I hope they may be of help to you.

https://github.com/HPWebdeveloper/laravel-pay-pocket
https://github.com/HPWebdeveloper/laravel-failed-jobs

--

--

Panjeh
Panjeh

Written by Panjeh

Posting about Python and Laravel

No responses yet