composer/composer — Issue #241: composer.json packages order conflicts
Author: kaiwa
Created: 2012-01-21 15:19:11+00:00
State: open

Experienced that some dependencies were missing when doing an installation. After some time I figured it out that the order in which the packages are listed in the composer.json file, has influence to the success of dependency-resolution. Narrowed it down to this example for reproducing:

_composer.json_

{
"require": {
"jms/metadata" : "master-dev",
"jms/security-extra-bundle": "master-dev"
}
}

`php /usr/local/bin/composer.phar install` will install:

Installing jms/aop-bundle (1.0.0)
Installing jms/security-extra-bundle (master-dev)
Installing jms/metadata (master-dev)

Well, here's the strange part: Now let's place jms/metadata **after** jms/security-extra-bundle in the composer.json file:

_composer.json_

{
"require": {
"jms/security-extra-bundle": "master-dev"
"jms/metadata" : "master-dev",
}
}

`rm -rf ./vendor ./composer.lock`
`php /usr/local/bin/composer.phar install`

Installing doctrine/common (2.2.0-RC5)
Installing symfony/http-foundation (2.1.0-dev)
Installing symfony/event-dispatcher (2.1.0-dev)
Installing symfony/http-kernel (2.1.0-dev)
Installing symfony/filesystem (2.1.0-dev)
Installing symfony/routing (2.1.0-dev)
Installing symfony/templating (2.1.0-dev)
Installing symfony/translation (2.1.0-dev)
Installing symfony/dependency-injection (2.1.0-dev)
Installing symfony/config (2.1.0-dev)
Installing symfony/framework-bundle (2.1.0-dev)
Installing jms/cg (1.0.0)
Installing jms/metadata (1.1.1)
Installing jms/aop-bundle (1.0.0)
Installing jms/security-extra-bundle (master-dev)