From aa1745ce2a5e7e8d6ea8a9d762153d8c1557b26b Mon Sep 17 00:00:00 2001 From: Haralan Dobrev Date: Sun, 30 Mar 2014 23:33:30 +0300 Subject: [PATCH] Specify how ~ constraints handle pre-releases The "next significant release" a.k.a as the tilde version constraint would not install a pre-release (alpha, beta, RC) which is not in the same version namespace. But in the examples so far it was shown as `~1.2` equals `>=1.2,<2.0` which would actually install `2.0-beta.1`, because it the pre-release is before the `2.0` release. See https://github.com/composer/getcomposer.org/issues/64 --- doc/01-basic-usage.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/01-basic-usage.md b/doc/01-basic-usage.md index 1aa3eee05..dc05489c6 100644 --- a/doc/01-basic-usage.md +++ b/doc/01-basic-usage.md @@ -82,6 +82,10 @@ including, 2.0). Since in theory there should be no backwards compatibility breaks until 2.0, that works well. Another way of looking at it is that using `~` specifies a minimum version, but allows the last digit specified to go up. +> **Note:** Though `2.0-beta.1` is considered before `2.0`, a version constraint +> like `~1.2` would not install it. So it will install every release in the same +> *namespace* and not in the `2.0` namespace. + ### Stability By default only stable releases are taken into consideration. If you would like