composer/composer — Issue #267: Unexpected differences between install and update
Author: marijn
Created: 2012-01-29 00:48:12+00:00
State: open

I'm encountering unexpected differences between ` $ composer.phar install --dev` and ` $ composer.phar update --dev`

My `composer.json` configuration file:

``` json
{
"name": "my-comp/core-bundle",
"version": "0.0.1",
"type": "symfony-bundle",
"authors": [
{
"name": "Marijn Huizendveld",
"email": "marijn@my-comp.com"
}
],
"require": {
"doctrine/orm": "2.2.0-dev",
"symfony/console": "2.1.0-dev",
"symfony/finder": "2.1.0-dev",
"symfony/form": "2.1.0-dev",
"symfony/framework-bundle": "2.1.0-dev",
"symfony/security": "2.1.0-dev"
},
"autoload": {
"psr-0": {
"MyComp\\Bundle\\CoreBundle": ""
}
},
"target-dir": "MyComp/Bundle/CoreBundle"
}
```

When I try to update my already checked out (developer version) of my vendor code I encounter the following error when I use `$ composer.phar update --dev`:

```
PHP Notice: Undefined offset: 0 in phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 2
PHP Catchable fatal error: Argument 4 passed to Composer\DependencyResolver\Solver::setPropagateLearn() must be an instance of Composer\DependencyResolver\Rule, null given, called in phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 2 and defined in phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 2
```

However, when I run `$ composer.phar install --dev` everything goes as expected an my installation is updated accordingly.