|Composer and 3.1.0-rc1||Ingo Schommer||8/15/13 2:47 AM|
The recent 3.1.0-rc1 release surfaced a bug in the composer dependency
definitions of modules. We previously recommended modules relying on 3.1 or newer
to use the following format: >=3.1.x-dev,<4.0, which turned out not to be particularly reliable.
3.1.0-rc1 doesn't satisfy this constraint any longer, and composer has been
fixed to allow the previously discouraged "~3.1" notation.
Please ensure you're running the latest version of composer ("composer selfupdate"),
and fix up your composer.json using the following best practices:
- For 3.0 only, use "3.0.*" (includes 3.0.0, 3.0.1, 3.0.x-dev …)
- For 3.1 only, use "3.1.*" (includes 3.1.0, 3.1.1, 3.1.0-rc1, 3.1.x-dev, …)
- For 3.1 and newer, use "~3.1" (includes 3.1.0, 3.1.1, 3.1.0-rc1, 3.1.x-dev, 3.2.x-dev, dev-master, 3.2.0, 3.2.0-beta1, 3.3.0 …)
- For master only, use "~3.2" (we've created a branch alias there)
If in doubt, keep your dependencies open ended, e.g. don't set to "3.1.*" unless
dev-master specifically breaks your project. In most cases, the tilde operator will be the right choice.
Given the deep changes in the 3.1 release, the majority of modules will need separate 3.0 and 3.1 compatible branches.
The composer docs have details on version constraints, although its pretty light on details.
Look through their unit tests for more comprehensive coverage.
See these issues for more context: