What is the meaning of the Composer Version constraint `>=N.N.N`

Viewed 290

What is the highest version of PHP allowed by the following composer package manager version constraint?

 "php": "^5.5.9|>=7.0.8"

The docs say that:-

  • ^5.5.9 means >=5.5.9 <6.0.0 (read: "greater or equal to 5.5.9 AND less than 6.0.0)

  • | is probably the same as || which means OR

But what does >=7.0.8 expand to? In the stability section the docs say that

Composer will default internally to -dev or -stable, depending on the operator(s) used

and gives an example of >=1.2 being treated internally as >=1.2.0.0-dev but it doesn't say how >=1.2.0 is treated. It is also not clear whether this is an open ended constraint.

So does the constraint allow any version of PHP at or above 7.0.8? Does it only allow versions at or above 7.0.8 but below 8.0.0? Does it allow -dev? Would it allow 8.0-dev?

1 Answers
Related