Color legend:
- patch or minor (red) release available - update recommended
- major release (yellow) available - update possible
A patch/minor release means that if you run composer update, it will update the package to the newest minor release within the same major version.
Eg: Laravel 11.15.0 could be updated to 11.16.0. This would be in red.
Both here are Laravel 11.
But if you were running Laravel 10, you might see something like this:
Laravel 10.48.14 could be updated to 11.16.0. This would be in yellow.
Going up a major version will not be done automatically. You would need to specify the major version you want to install by editing the composer.json file or specifying the version in the composer update command.
@aleahy Are there some way automate raising of any package version in composer.json. I mean now I manually edit composer.json when I need to fresh all packages...
@PetroGromovo You can run composer upgrade which will do a minor update of all your packages. Your json file will need to have a ^ before the version number to allow it (it probably does, it does this by default when you install something).
Eg: "laravel/framework": "^11.0". This means that any time you do composer update, it will update the version of laravel to the latest version of V11. You won't see a change in composer.json, but your lock file will have the specific version that should be installed. Keep in mind that it won't upgrade to V12 when V12 comes out (which is a good thing - see below).
When you want to do a specific package you can also do composer upgrade <packagename>.
You could make your composer.json file set up so the above command also upgrades major versions, but since major versions have breaking changes this is usually a BAD IDEA. (see The Death Star Version Constraint). This is when manually editing your json file is a good idea because it shows you mean to do it.
@PetroGromovo In answer to what you should do with different versions, if you have tests to make sure everything works, I would just run composer update and let the packages update to the latest version of the currently installed main version.
I would definitely NOT allow any packages to be "*" in the composer.json. This means that it can update to ANY version and introduce breaking changes that stop your app from working.
Any time you want to update to the next major version of a package, do so manually and carefully and make sure you have some way of checking that your app isn't broken afterwards.
This means change the version number in composer.json and then run composer update for that package.