5
votes

I'm trying to fix Doctrine's Erroneous data format for unserializing bug as referenced here and here.


My composer.json looks like this ...

require: {
    "symfony/symfony": "~2.5",  
    "doctrine/doctrine-bundle": "~1.2", 
    "doctrine/orm": "dev-master",
    "...": "..."
}

... but composer complains that it can't find a matching package:

doctrine/orm dev-master requires doctrine/dbal >=2.5-dev,<2.6-dev -> no matching package found.

How can I resolve the dependencies without forking or raising the minimum-stability in the composer.json?

UPDATE: Nifr's suggestion worked, this is the new config:

"symfony/symfony": "~2.5",
"doctrine/orm": "dev-master",
"doctrine/dbal": "@dev",
"doctrine/common": "@dev",
"doctrine/doctrine-bundle": "@dev",
1

1 Answers

6
votes

You can "whitelist" packages that currently have a lower stability level than the "global" minimum-stability defined in your composer.json by using stability flags.

In order to stop composer from complaining ...

doctrine/orm dev-master requires doctrine/dbal >=2.5-dev,<2.6-dev -> no matching package found.

... just require the doctrine/dbal package explicitly with the @dev stability flag.

Therefore execute ...

composer require doctrine/dbal:@dev

... or add the entry to your composer.json manually:

require: {
   "...": "...",
   "doctrine/orm": "dev-master",
   "doctrine/dbal": "@dev"
}

Repeat this procedure for all dependencies that don't match the global minimum-stability until composer installs without complaining.


Further reading:

Igor W. has published an excellent blog article explaining stability flags in detail.