KnpLabs / KnpMenuBundle

Object Oriented menus for your Symfony project.
http://knplabs.com
MIT License
1.4k stars 203 forks source link

Composer Update Error #195

Closed juanbar closed 11 years ago

juanbar commented 11 years ago

In composer.json:

"knplabs/knp-menu-bundle":"dev-master"

After running the command:

php composer.phar update knplabs/knp-menu-bundle

Your requirements could not be resolved to an installable set of packages.

Problem 1

Potential causes:

stof commented 11 years ago

I fixed the composer constraint. Sorry for the issue. Simply update again.

juanbar commented 11 years ago

I´m getting the same error...

$php composer.phar update knplabs/knp-menu-bundle

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

Potential causes:

stof commented 11 years ago

@juanbar Please paste your composer.json

juanbar commented 11 years ago

...

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "stof/doctrine-extensions-bundle": "~1.1@dev",
    "friendsofsymfony/user-bundle": "~2.0@dev",
    "knplabs/knp-menu-bundle":"dev-master"
},

...

stof commented 11 years ago

Well, the issue in your case is probably the minimum stability. By default, composer uses stable, and KnpMenuBundle dev-master requires an unstable version of KnpMenu

delor34n commented 11 years ago

i have the same problem... What do you mean with 'requires an unstable version of KnpMenu'?

BTW, i'm using Symfony 2.3v

delor34n commented 11 years ago

You must add to your 'composer.json' this line:

"knplabs/knp-menu": "2.0.*@dev"

florinutz commented 11 years ago

Problem 1

Potential causes:

Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "symfony/icu": "1.2.*@dev",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "friendsofsymfony/user-bundle": "~1.3",
    "sonata-project/user-bundle": "2.2.*@dev",

    "knplabs/knp-menu-bundle" : "2.2.*@dev",
    "sonata-project/admin-bundle": "2.2.*@dev",
    "sonata-project/doctrine-orm-admin-bundle": "2.2.*@dev",
    "sonata-project/easy-extends-bundle": "2.1.*@dev"
},
stof commented 11 years ago

Where have you found a doc telling you to use 2.2.*@dev ? There is no such version for KnpMenuBundle

florinutz commented 11 years ago

yes. sorry

Problem 1

it only works with 1.1.*, but that raises other problems (slightly more acceptable than a composer error)

stof commented 11 years ago

@florinutz for 2.0, you either need to put your minimum stability to dev, or to whitelist the dev versions of KnpMenu as explained in previous comments in the dicussions, because 2.0 is not stable. It is a dev version

mauzeh commented 10 years ago

I had the same issue as described above. The way I got it to work was by explicitly requiring the KnpMenu library (and specifying the dev-master version of that as well). Will send a pull request for a change in the installation docs, as I ran into this problem when doing a clean install on an empty Symfony project so I'm guessing more people will run into this problem...

romeugodoi commented 10 years ago

I have the same problem. I'm using symfony 2.5.x composer.json:

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.5.x-dev",
    "doctrine/orm": "~2.2,>=2.2.3",
    "doctrine/doctrine-bundle": "~1.2",
    "twig/extensions": "~1.0",
    "symfony/assetic-bundle": "~2.3",
    "symfony/swiftmailer-bundle": "~2.3",
    "symfony/monolog-bundle": "~2.4",
    "sensio/distribution-bundle": "~2.3",
    "sensio/framework-extra-bundle": "~3.0",
    "sensio/generator-bundle": "~2.3",
    "incenteev/composer-parameter-handler": "~2.0",
    "knplabs/knp-menu": "2.0.*@dev,>=2.0.0-beta1",
    "knplabs/knp-menu-bundle": "dev-master",
    "sonata-project/core-bundle": "~2.2@dev",
    "sonata-project/admin-bundle": "dev-master",
    "sonata-project/doctrine-orm-admin-bundle": "dev-master"
},
"scripts": {
    "post-install-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ],
    "post-update-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ]
},
"config": {
    "bin-dir": "bin"
},
"minimum-stability": "dev",
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "symfony-assets-install": "symlink",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    }
}
romeugodoi commented 10 years ago

composer update solve this.