composer/composer — Issue #290: Version constraints do not apply to dependencies
Author: mahok
Created: 2012-02-13 10:10:51+00:00
State: open

When using a restrictive version constraint, I would expect the dependencies to use the more restrictive constraint as well. I have made a screenshot, to make it more clear:

![Screenshot](http://i.imgur.com/GkLhI.png)

When explicitly requiring doctrine/orm 2.1.6, I would expect doctrine/dbal and doctrine/common to be fetched as 2.1.6 as well, instead 2.1.* is used.

A solution could be, that if the required version matches "2.1.6" and the dependencies for this require are marked as "2.1.*" to pass down the more restrictive constraint, instead of using the more general one. If the major-version of a sub-dependency is 2.0.* of course this would not apply, as the requested part before the * does not match with 2.**1**.