0
votes

On Symfony 2.3 and using composer trying to install a new bundleI get the following:

Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

Problem 1 - The requested package doctrine/doctrine-bundle (locked at v1.2.0, required as ~1.4) is satisfiable by doctrine/doctrine-bundle[v1.2.0] but these conflict with your requirements or minimum-stability. Problem 2 - The requested package doctrine/cache (locked at v1.3.0, required as ~1.6) is satisfiable by doctrine/cache[v1.3.0] but these conflict with your requirements or minimum-stability.

Installation failed, reverting ./composer.json to its original content.

How do I resolve these?

My json file:

"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/cache": "~1.6"
},
    "minimum-stability": "stable",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.3-dev"
        }
    }
1
Could you show us your composer.json? It looks like there is problem with minimum-stability line. Also try removing it.Tomas Votruba
Tomas I added the part of the json that shows the minimum-stability. What does this mean? I'm just taking over this fro previous devJuan Gonzales
Thanks. It means if you use stable versions od dev versions (unstable). There is default value "minimum-stability": "stable", so you can delete it. It looks like it is Symfony sandbox's composer.json. You can also leave branch-alias part. What happened after the removal?Tomas Votruba
@Tomas, my understanding is that by using "minimum-stability" requires all of the bundles to meet the minimums to be able to have an stable project, isn't this correct? So is forcing you to install stable bundles.Juan Gonzales
Yes, it is default value, so you can omit that line.Tomas Votruba

1 Answers

0
votes

You can choose to install packages that are not released yet if there is no stable release available by adding this just before the require section of your composer.json file:

// ...

"minimum-stability": "dev",
"prefer-stable": true,
"require": {
    "php": ">=5.5.9",
    "symfony/symfony": "3.1.*",
    "doctrine/orm": "^2.5",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/doctrine-cache-bundle": "^1.2",
    "symfony/swiftmailer-bundle": "^2.3",
    "symfony/monolog-bundle": "^2.8",
    "symfony/polyfill-apcu": "^1.0",
    "sensio/distribution-bundle": "^5.0",
    "sensio/framework-extra-bundle": "^3.0.2",
    "incenteev/composer-parameter-handler": "^2.0",
    "symfony/assetic-bundle": "^2.8",
},

// ...

You have to remove the other minimum stability rule of course