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 :
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:
Learn more here.