2

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 sonata-project/admin-bundle could not be found in any version, there may be a typo in the package name. Problem 2 - The requested package sonata-project/doctrine-orm-admin-bundle could not be found in any version, there may be a typo in the package name. Problem 3 - The requested package sonata-project/user-bundle could not be found in any version, there may be a typo in the package name.

code de composer.json

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.2.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.2.*",
        "symfony/monolog-bundle": "2.2.*",
        "sensio/distribution-bundle": "2.2.*",
        "sensio/framework-extra-bundle": "2.2.*",
        "sensio/generator-bundle": "2.2.*",
        "jms/security-extra-bundle": "1.4.*",
        "jms/di-extra-bundle": "1.3.*",
        "sonata-project/admin-bundle": "*",
        "sonata-project/cache-bundle": "*",
        "sonata-project/doctrine-orm-admin-bundle": "*",
        "stof/doctrine-extensions-bundle": "1.1.x-dev",
        "sonata-project/user-bundle": "*",
        "sonata-project/easy-extends-bundle": "*",
        "friendsofsymfony/user-bundle": "*",
        "friendsofsymfony/jsrouting-bundle": "*",
        "liip/imagine-bundle": "*",
        "simplethings/form-extra-bundle": "dev-master",
        "antimattr/google-bundle": "dev-master",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "genemu/form-bundle": "2.1.*",
        "behat/behat": "2.4.*@stable",
        "behat/mink": "1.4.*@stable",
        "behat/symfony2-extension": "*@stable",
        "behat/mink-extension": "*@stable",
        "behat/mink-selenium2-driver": "*@stable",
        "behat/mink-browserkit-driver": "*",
        "liip/functional-test-bundle": "dev-master"
    },
    "scripts": {
        "post-install-cmd": [
            "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": [
            "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": "alpha",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "branch-alias": {
        "dev-master": "2.2-dev"
    }
}
Class
  • 3,149
  • 3
  • 22
  • 31
user2198773
  • 21
  • 1
  • 2

4 Answers4

4

You need to specify 'dev-master' and also add the 'Bock-Bundle' dependency.

Just change

"sonata-project/admin-bundle": "",

to

"sonata-project/block-bundle": "dev-master",
"sonata-project/admin-bundle": "dev-master",
Rob K
  • 224
  • 1
  • 6
1

try with this in your composer.json:

"sonata-project/admin-bundle": "dev-master",
"sonata-project/cache-bundle": "2.1.",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"knplabs/knp-menu-bundle": "1.1.
-dev",
"sonata-project/block-bundle": "dev-master"

It worked for me.

kiduxa
  • 3,339
  • 11
  • 37
  • 52
0

You don't see the "sonata-project/doctrine-orm-admin-bundle dev-master requires knplabs/knp-menu-bundle 1.1.x-dev" error ?

Thomas Decaux
  • 21,738
  • 2
  • 113
  • 124
0

I had very similar problems while using Symfony 2.2 with Sonata Admin Generator and FOS User Bundle.

Here are the config files I created after endless hours of dependency related headache. Using 'composer update' with this configuration runs without any problem.


composer.json

....    
"require": {
            "php": ">=5.3.3",
            "symfony/symfony": "2.2.*",
            "doctrine/orm": "~2.2,>=2.2.3",
            "doctrine/doctrine-bundle": "1.2.*",
            "twig/extensions": "1.0.*",
            "symfony/assetic-bundle": "2.1.*",
            "symfony/swiftmailer-bundle": "2.2.*",
            "symfony/monolog-bundle": "2.2.*",
            "sensio/distribution-bundle": "2.2.*",
            "sensio/framework-extra-bundle": "2.2.*",
            "sensio/generator-bundle": "2.2.*",
            "jms/security-extra-bundle": "1.4.*",
            "jms/di-extra-bundle": "1.3.*",
            "symfony/console": "2.2.*@dev",
            "doctrine/doctrine-fixtures-bundle": "dev-master",
            "doctrine/data-fixtures" : "dev-master",
            "friendsofsymfony/user-bundle": "*",
            "doctrine/doctrine-migrations-bundle": "dev-master",
            "doctrine/migrations": "dev-master",
            "sonata-project/admin-bundle": "dev-master",
            "sonata-project/doctrine-orm-admin-bundle": "dev-master",
            "sonata-project/intl-bundle": "2.1.*",
            "sonata-project/cache-bundle": "2.*",
            "sonata-project/block-bundle": "2.2.*@dev",
            "simplethings/entity-audit-bundle": "dev-master",
            "knplabs/knp-menu-bundle":"1.1.x-dev"
        },
....
  "minimum-stability": "alpha",

AppKernel.php

   public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
            new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
            new JMS\AopBundle\JMSAopBundle(),
            new JMS\DiExtraBundle\JMSDiExtraBundle($this),
            new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
            new FOS\UserBundle\FOSUserBundle(),
            new Sonata\BlockBundle\SonataBlockBundle(),
            new Sonata\jQueryBundle\SonatajQueryBundle(),
            new Sonata\AdminBundle\SonataAdminBundle(),
            new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
            new SimpleThings\EntityAudit\SimpleThingsEntityAuditBundle(),
            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
        );

Hope this helps!

cb0
  • 8,415
  • 9
  • 52
  • 80