哪个DoctrineBundle版本适用于Symfony 2.0.15?

时间:2012-06-17 16:34:27

标签: mongodb symfony doctrine-orm doctrine-odm composer-php

我花了几天时间试图在Symfony 2.0.15中解决我的问题。我找不到兼容的捆绑列表,我一直在追逐github周围的提交,试图遵循一系列非BC更改来获取适合我的版本列表。最终我选择放弃并升级到作曲家,却发现一些Doctrine核心需要Symfony 2.1,但其他一些Doctrine捆绑包需要Symfony< 2.1并且最终我也放弃了它。

安装了以下Bundles的人可以告诉我们他们在deps.lock中使用的稳定版本吗?

[symfony]
git=http://github.com/symfony/symfony.git
version=v2.0.15

[twig]
git=http://github.com/fabpot/Twig.git
version=v1.8.2

[monolog]
git=http://github.com/Seldaek/monolog.git
version=1.0.2

[doctrine-common]
git=http://github.com/doctrine/common.git
version=2.1.4

[doctrine-dbal]
git=http://github.com/doctrine/dbal.git
version=2.1.7

[doctrine]
git=http://github.com/doctrine/doctrine2.git
version=2.1.7

[swiftmailer]
git=http://github.com/swiftmailer/swiftmailer.git
version=v4.1.7

[assetic]
git=http://github.com/kriswallsmith/assetic.git
version=cc2e9adb744df0704a5357adc1cf9287c427420f

[twig-extensions]
git=http://github.com/fabpot/Twig-extensions.git

[metadata]
git=http://github.com/schmittjoh/metadata.git
version=1.0.0

[SensioFrameworkExtraBundle]
git=http://github.com/sensio/SensioFrameworkExtraBundle.git
target=/bundles/Sensio/Bundle/FrameworkExtraBundle
version=origin/2.0

[JMSSecurityExtraBundle]
git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
target=/bundles/JMS/SecurityExtraBundle
version=origin/1.0.x

[SensioDistributionBundle]
git=http://github.com/sensio/SensioDistributionBundle.git
target=/bundles/Sensio/Bundle/DistributionBundle
version=origin/2.0

[SensioGeneratorBundle]
git=http://github.com/sensio/SensioGeneratorBundle.git
target=/bundles/Sensio/Bundle/GeneratorBundle
version=origin/2.0

[AsseticBundle]
git=http://github.com/symfony/AsseticBundle.git
target=/bundles/Symfony/Bundle/AsseticBundle
version=v1.0.1

[doctrine-mongodb]
git=http://github.com/doctrine/mongodb.git

[doctrine-mongodb-odm]
git=http://github.com/doctrine/mongodb-odm.git

[DoctrineMongoDBBundle]
git=http://github.com/doctrine/DoctrineMongoDBBundle.git
target=/bundles/Symfony/Bundle/DoctrineMongoDBBundle
version=v2.0.1

[DoctrineMigrationsBundle]
git=https://github.com/doctrine/DoctrineMigrationsBundle.git
target=/bundles/Symfony/Bundle/DoctrineMigrationsBundle
version=origin/2.0

[doctrine-migrations]
git=http://github.com/doctrine/migrations.git

[doctrine-fixtures]
git=http://github.com/doctrine/data-fixtures.git

[DoctrineFixturesBundle]
git=https://github.com/doctrine/DoctrineFixturesBundle.git
target=/bundles/Symfony/Bundle/DoctrineFixturesBundle
version=origin/2.0

[DoctrineBundle]
git=http://github.com/doctrine/DoctrineBundle.git
target=/bundles/Doctrine/Bundle/DoctrineBundle

[FOSJsRoutingBundle]
git=http://github.com/FriendsOfSymfony/FOSJsRoutingBundle.git
target=/bundles/FOS/JsRoutingBundle

[GedmoDoctrineExtensions]
git=http://github.com/l3pp4rd/DoctrineExtensions.git
target=/gedmo-doctrine-extensions

[StofDoctrineExtensionsBundle]
git=http://github.com/stof/StofDoctrineExtensionsBundle.git
target=/bundles/Stof/DoctrineExtensionsBundle

使用这些组合,由于类不存在或重命名的方法,我得到一组常量错误,然后我在github存储库中查找并尝试修复一个解决此错误的提交/标记,只是为了得到另一个集合错误,因为其他类不存在或重命名的方法。由于Doctrine组织的命名空间更改,我无法回到几周前的稳定状态 - (@see What happened to Doctrine's Symfony Bundle repos?

或者我不介意切换到作曲家;继承了我尝试过的composer.json,但是没有用

{
"require": {
      "symfony/symfony" : "v2.0.15",
      "symfony/doctrine-bridge": "2.1.x-dev",
      "doctrine/common" : "2.1.4",
      "doctrine/orm" : "2.1.6",
      "symfony/finder" : "v2.0.15",

      "symfony/assetic-bundle" : "2.0.x-dev",
      "twig/extensions" : "dev-master",
      "jms/security-extra-bundle" : "1.0.x",
      "sensio/framework-extra-bundle" : "2.0.x-dev",
      "sensio/distribution-bundle" : "2.0.x-dev",
      "sensio/generator-bundle" : "2.0.x-dev",

      "doctrine/doctrine-bundle": "v1.0.0-beta1",
      "doctrine/mongodb-odm-bundle": "v2.0.1",

},
"autoload": {
    "psr-0": {
        "Oh": "src/"
    }
}
}

每当我尝试修复composer.json中的依赖项时,我似乎都会一次又一次地升级和降级相同的软件包,但总是会出现错误“您的需求无法解决为一组可安装的软件包“。如果有人可以使用Symfony 2.0.15使用Doctrine,MongoDB,DoctrineFixtures和DoctrineMigrations捆绑包为我提供他们的composer.json设置,我将非常感激。

1 个答案:

答案 0 :(得分:2)

这是我的作曲家配置的一部分:

{
    "require": {
        "php":              ">=5.3.3",
        "symfony/symfony":  "2.0.15",
        "doctrine/orm":     "2.1.7",
        "twig/extensions":  "*",

        "symfony/assetic-bundle":         "2.0.x-dev",
        "sensio/generator-bundle":        "2.0.*",
        "sensio/framework-extra-bundle":  "2.0.*",
        "jms/security-extra-bundle":      "1.0.*",

        "stof/doctrine-extensions-bundle":     "*",
        "doctrine/doctrine-migrations-bundle": "2.0.*"
    }
}

我不是在使用ODM。