2012-06-17 63 views
1

我花了几天的时间试图理清我在Symfony 2.0.15中的地位。我无法找到一个兼容的软件包列表,我一直在追踪github提交的提交,试图按照非BC变更链来获取适用于我的版本列表。最终,我选择放弃并升级为作曲家,结果发现某些教义核心需要Symfony 2.1,但其他一些教义束要求Symfony 2.1.2,最终我放弃了这一点。哪个DoctrineBundle版本适用于Symfony 2.0.15?

是否可以安装以下软件包的某人,请让我知道他们从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为我提供的composer.json设置与Doctrine,MongoDB,DoctrineFixtures和DoctrineMigrations捆绑包,我将非常感激。

回答

2

这是我工作的作曲家配置的一部分:我没有使用ODM虽然

{ 
    "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.*" 
    } 
} 

+1

谢谢jakub。我想我试图在我的作曲家中包含太多的软件包。我确实设法通过用“*”取代所有包版本来让一个工作的作曲家理清它自己的依赖关系,但我认为使用非稳定版本的一切都是有风险的。我已经把我的整个composer.json和AppKernel放在了一个要点上,以帮助任何可能需要它的人https://gist.github.com/2947908 –

+0

如果你想锁定版本,packagist.org可以帮助你。您可以看到您的软件包及其依赖项的版本。 –

+1

对我来说麻烦的是我在我的composer.json中包含了一些软件包,这些软件包已经被包含在其他软件包中,并且很难看到所有将要安装的软件包。如果有一种工具可以查看树形结构中的所有依赖关系,而不必查找每个依赖关系并记住取决于什么的东西,那将很方便。 –

相关问题