我无法正确解析Sylius设置包。我的应用程序是一个Symfony标准应用程序。根据Symfony 2.4.4
的默认json,需求是doctrine/doctrine-bundle ~1.2
我当前的json:https://gist.github.com/Rvanlaak/f627a73a8d431600f8ba
解析sylius/settings-bundle ~0.9
给我以下错误:
- Installation request for doctrine/doctrine-bundle == 1.2.0.0 -> satisfiable by doctrine/doctrine-bundle[v1.2.0].
- Conclusion: don't install doctrine/doctrine-bundle 1.3.x-dev
- sylius/settings-bundle v0.9.0 requires sylius/resource-bundle 0.9.*@dev -> satisfiable by sylius/resource-bundle[v0.9.0].
- sylius/settings-bundle 0.10.x-dev requires sylius/resource-bundle 0.10.*@dev -> satisfiable by sylius/resource-bundle[0.10.x-dev].
- sylius/resource-bundle v0.9.0 requires doctrine/doctrine-bundle ~1.3@dev -> satisfiable by doctrine/doctrine-bundle[1.3.x-dev, v1.3.0-beta1].
- sylius/resource-bundle 0.10.x-dev requires doctrine/doctrine-bundle ~1.3@dev -> satisfiable by doctrine/doctrine-bundle[1.3.x-dev, v1.3.0-beta1].
- Conclusion: don't install doctrine/doctrine-bundle v1.3.0-beta1
- Installation request for sylius/settings-bundle ~0.9 -> satisfiable by sylius/settings-bundle[0.10.x-dev, v0.9.0].
将我的doctrine/doctrine-bundle更改为~1.3@dev或1.2.0会产生错误:
- The requested package doctrine/doctrine-bundle == 1.2.0.0 could not be found.
然后require sylius/settings-bundle dev-master给出错误:
- Can only install one of: doctrine/doctrine-bundle[1.3.x-dev, v1.2.0].
- Can only install one of: doctrine/doctrine-bundle[v1.2.0, 1.3.x-dev].
- sylius/resource-bundle 0.10.x-dev requires doctrine/doctrine-bundle ~1.3@dev -> satisfiable by doctrine/doctrine-bundle[1.3.x-dev].
- sylius/settings-bundle dev-master requires sylius/resource-bundle 0.10.*@dev -> satisfiable by sylius/resource-bundle[0.10.x-dev].
- Installation request for sylius/settings-bundle dev-master -> satisfiable by sylius/settings-bundle[dev-master].
- Installation request for doctrine/doctrine-bundle v1.2.0 -> satisfiable by doctrine/doctrine-bundle[v1.2.0].
所以对我来说,依赖性似乎是相互矛盾的。Symfony标准版无法解析sylius/settings-bundle吗?
编辑
删除以下bundle后,composer实际上正确解析了
"lexik/form-filter-bundle" : "~2.0",
"knplabs/knp-paginator-bundle" : "~2.3",
"liip/imagine-bundle" : "<1.0.x-dev",
"raulfraile/ladybug-bundle" : "~1.0",
"simplethings/entity-audit-bundle" : "~0.5",
"knplabs/knp-snappy-bundle" : "~1.1",
"fpn/tag-bundle": "~0.9"
Sylius依赖项这些天是一个完全混乱的(它是一个预alpha版本)。目前还没有好的解决方案,但是如果您使用
"minimum-stability": "dev",
"prefer-stable": true,
在你的composer.json
中,你可能会得到你所期望的。
安装原则1.3.0@dev,与Symfony 2.4不兼容。所以教条代码生成器(app/console doctrine:...
)会爆炸,但是Sylius会工作。
正如我所说,目前还没有一个最佳的解决方案,也许是Symfony 2.5。
将所有Sylius bundle设置为0.9版本。没有冲突