Make composer respect dependencies version
Awkan opened this issue · 0 comments
Awkan commented
Problem
There is a confusion in composer.json
file between ~
and ^
.
Indeed, you define your versions like ^
but use ~
.
e.g. "knplabs/gaufrette":"~0.1.7|~0.2|~0.3|~0.4|~0.5|~0.6" is the SemVer definition but ~
is inapropriate.
~0.2
= >0.2.0
&& < 1.0.0
^0.2
= >0.2.0
&& < 0.3.0
Solution
- Use
^
for each dependencies (Which is more SemVer friendly !) - Use
~
for it appropriate usage (e.g."knplabs/gaufrette":"~0.1.7|~0.2|~0.3|~0.4|~0.5|~0.6"
would be"knplabs/gaufrette":"~0.1.7|~0.2"
) (BUT^
is better !)