sonata-project / SonataAdminBundle

The missing Symfony Admin Generator
https://docs.sonata-project.org/projects/SonataAdminBundle
MIT License
2.11k stars 1.26k forks source link

Can't install SonataAdminBundle on Symfony 2.4 #1875

Closed sinner closed 10 years ago

sinner commented 10 years ago

In fact I execute the command:

composer require sonata-project/admin-bundle

this return to me that response.

Please provide a version constraint for the sonata-project/admin-bundle requirement: dev-master
./composer.json has been updated
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
    - symfony/framework-bundle 2.0.7 requires symfony/translator 2.0.7 -> no matching package found.
    - Conclusion: remove symfony/symfony v2.4.0
    - Installation request for sonata-project/admin-bundle dev-master -> satisfiable by sonata-project/admin-bundle[dev-master].
    - knplabs/knp-menu-bundle v1.1.0 requires symfony/framework-bundle >=2.0,<2.2-dev -> satisfiable by symfony/symfony[2.0.7, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9], symfony/framework-bundle[2.0.7, v2.0.10, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].
    - knplabs/knp-menu-bundle v1.1.1 requires symfony/framework-bundle >=2.0,<2.3-dev -> satisfiable by symfony/symfony[2.0.7, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9], symfony/framework-bundle[2.0.7, v2.0.10, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9].
    - Can only install one of: symfony/symfony[v2.4.0, 2.0.7].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.10].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.11].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.12].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.13].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.14].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.15].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.16].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.17].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.18].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.19].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.20].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.21].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.22].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.23].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.24].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.25].
    - Can only install one of: symfony/symfony[v2.4.0, v2.0.9].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.0].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.1].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.10].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.11].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.12].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.13].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.2].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.3].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.4].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.5].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.6].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.7].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.8].
    - Can only install one of: symfony/symfony[v2.4.0, v2.1.9].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.0].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.1].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.10].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.11].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.2].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.3].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.4].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.5].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.6].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.7].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.8].
    - Can only install one of: symfony/symfony[v2.4.0, v2.2.9].
    - don't install symfony/framework-bundle v2.2.0|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.1|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.10|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.11|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.2|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.3|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.4|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.5|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.6|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.7|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.8|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.2.9|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.0|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.1|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.10|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.11|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.12|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.13|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.2|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.3|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.4|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.5|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.6|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.7|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.8|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.1.9|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.10|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.12|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.13|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.14|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.15|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.16|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.17|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.18|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.19|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.20|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.21|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.22|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.23|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.24|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.25|don't install symfony/symfony v2.4.0
    - don't install symfony/framework-bundle v2.0.9|don't install symfony/symfony v2.4.0
    - Installation request for symfony/symfony ~2.4 -> satisfiable by symfony/symfony[v2.4.0].
    - Conclusion: remove knplabs/knp-menu-bundle dev-master|install knplabs/knp-menu-bundle v1.1.0|install knplabs/knp-menu-bundle v1.1.1
    - sonata-project/admin-bundle dev-master requires knplabs/knp-menu-bundle ~1.1 -> satisfiable by knplabs/knp-menu-bundle[1.1.x-dev, v1.1.0, v1.1.1, v1.1.2].
    - Can only install one of: knplabs/knp-menu-bundle[dev-master, 1.1.x-dev].
    - Can only install one of: knplabs/knp-menu-bundle[v1.1.2, dev-master].
    - Installation request for knplabs/knp-menu-bundle dev-master -> satisfiable by knplabs/knp-menu-bundle[dev-master].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

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

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

My composer.json file is this:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "~2.4",
        "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",
        "raulfraile/ladybug-bundle": "~1.0",
        "elao/web-profiler-extra-bundle" : "~2.3@dev",
        "jms/di-extra-bundle": "dev-master",
        "jms/serializer-bundle": "dev-master",
        "jms/security-extra-bundle": "dev-master",
        "gedmo/doctrine-extensions": "dev-master",
        "genemu/form-bundle": "2.2.*",
        "friendsofsymfony/jsrouting-bundle": "~1.1",
        "knplabs/knp-paginator-bundle": "dev-master",
        "knplabs/knp-menu-bundle": "dev-master",
        "knplabs/knp-menu": "2.0.*@dev",
        "craue/formflow-bundle": "dev-master",
        "mopa/bootstrap-bundle": "v3.0.0-beta3",
        "twbs/bootstrap": "v3.0.0",
        "sonata-project/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"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.4-dev"
        }
    }
}
lvarayut commented 10 years ago

The problem occurred because of the different version of KnpMenuBundle required. Change the "knplabs/knp-menu-bundle" From:

"require": {
//...
"knplabs/knp-menu-bundle": "dev-master"
//...
}

To:

"require": {
//...
"knplabs/knp-menu-bundle": "~1.1"
//...
}
rande commented 10 years ago

KnpMenuBundle 1.1 and 2.0 are now supported