2

使用包信息加载作曲家存储库更新依赖项(包括 require-dev)您的需求无法解析为可安装的包集。

问题 1 - 在任何版本中都找不到请求的包 sonata-project/admin-bundle,包名可能有拼写错误。问题 2 - 在任何版本中都找不到请求的包 sonata-project/doctrine-orm-admin-bundle,包名可能有拼写错误。问题 3 - 在任何版本中都找不到请求的包 sonata-project/user-bundle,包名可能有拼写错误。

代码作曲家.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"
    }
}
4

4 回答 4

4

您需要指定“dev-master”并添加“Bock-Bundle”依赖项。

只是改变

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

"sonata-project/block-bundle": "dev-master",
"sonata-project/admin-bundle": "dev-master",
于 2013-03-22T19:31:46.097 回答
1

在你的 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”

它对我有用。

于 2013-04-22T02:35:40.820 回答
0

在将 Symfony 2.2 与 Sonata Admin Generator 和 FOS User Bundle 一起使用时,我遇到了非常相似的问题。

这是我在无数小时的依赖相关头痛之后创建的配置文件。使用此配置的“composer update”运行没有任何问题。


作曲家.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",

应用内核.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(),
        );

希望这可以帮助!

于 2013-05-02T15:52:06.427 回答
0

您没有看到“sonata-project/doctrine-orm-admin-bundle dev-master 需要 knplabs/knp-menu-bundle 1.1.x-dev”错误?

于 2013-04-18T08:13:11.493 回答