Issue
When I run
composer require symfony/symfony
I have this in my composer JSON:
"symfony/symfony": "^2.7"
while I would like to have this:
"symfony/symfony": "^2.7.6"
Can I make composer to save patch (from convention MAJOR.MINOR.PATCH) into composer.json?
If that's not possible then why?
Solution
It is not possible, because of convention. In ~ 99% use cases it does not make sense to lock to patch version.
According to Semantic versioning, package should be compatible in every minor version. Meaning 2.5
won't break after update from 2.4
.
Software evolves and the less version you need to upgrade, the easier. This is kind of soft enforcement to upgrade (in words: don't be stuck on version 2.4
, if there is 2.15
) and support back package development.
Answered By - Tomas Votruba
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.