评论包似乎与2.3.7 symfony版本不兼容。
你能帮助我吗?
config.yml:
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0",
"symfony/framework-bundle": "2.3.*",
"friendsofsymfony/user-bundle": "1.3.*@dev",
"friendsofsymfony/rest-bundle": "0.12.0",
"friendsofsymfony/rest": "0.8.0",
"jms/serializer-bundle": "0.12.0",
"knplabs/knp-menu-bundle": "v1.1.2",
"knplabs/knp-menu": "v1.1.2",
"liip/imagine-bundle": "v0.17.0",
"imagine/imagine": "v0.5.0",
"rodchyn/cron-manager-bundle": "dev-master",
"bcc/extra-tools-bundle": "v1.0",
"symfony/intl": "2.3.*@dev",
"friendsofsymfony/comment-bundle": "2.0.5"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
}
错误:
- Installation request for symfony/framework-standard-edition 2.3.x-dev -> satisfiable by symfony/framework-standard-edition[2.3.x-dev].
- Conclusion: remove symfony/symfony v2.3.7
- Conclusion: don't install symfony/symfony v2.3.7
- Conclusion: don't install symfony/symfony v2.3.6
- Conclusion: don't install symfony/symfony v2.3.5
- Conclusion: don't install symfony/symfony v2.3.4
- Conclusion: don't install symfony/symfony v2.3.3
- Installation request for friendsofsymfony/comment-bundle 2.0.5 -> satisfiable by friendsofsymfony/comment-bundle[v2.0.5].
- Conclusion: don't install symfony/symfony v2.3.2
- friendsofsymfony/comment-bundle v2.0.5 requires symfony/symfony >=2.1,<2.3-dev -> satisfiable by symfony/symfony[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.0].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.1].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.10].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.11].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.12].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.13].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.2].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.3].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.4].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.5].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.6].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.7].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.8].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.9].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.0].
答案 0 :(得分:0)
您需要symfony / symfony版本2.3.7。 libraryofsymfony / comment-bundle版本2.0.5库表示它与Symfony 2.3不兼容,只与2.1.x或2.2.x版本兼容。
Composer告诉您它无法解决此冲突。
作为一般性建议,我建议不要在composer.json
文件中声明明确的软件版本,因为在添加新组件时它不灵活。某些冲突可能通过降级或升级其他组件来解决 - 只有在您允许这些版本更改时才会发生这种冲突。
例如,波浪号运算符对此很有用。通过要求“~2.3”的symfony,您声明您至少需要2.3.0版本,但是对于任何更新都要满意,直到2.999.999(即小于3.0)。这与使用语义版本控制的组件很好地配合,这意味着补丁版本在错误修正时递增,次要版本在以向后兼容的方式添加新功能时递增,并且当发生不兼容的更改时,市长版本递增。通常你会对任何兼容的更新感到满意,这就是为什么symfony的“~2.3”和2.3。*一样好,甚至更好,因为你也允许2.4.0及更高版本 - 这应该兼容2.3.x版本。
你可以用评论包做什么?如果您查看他们的Github仓库,您会看到在master分支中,composer.json不再强加“无2.3 symfony”限制。
此版本可通过以下方式提供给您的软件:
"friendsofsymfony/comment-bundle": "~2.0@dev"
或者您也可以使用星号:
"friendsofsymfony/comment-bundle": "2.0.*@dev"
“@dev”仅允许此组件的2.0版本的开发版本,并且因为声明主分支具有别名“2.0.x-dev”,因此Composer将主分支识别为2.0的当前开发版本。所以“2.0.*@dev”是master中的最新版本,我希望这个版本与Symfony 2.3兼容。
答案 1 :(得分:0)
使用:
“friendsofsymfony / comment-bundle”:“〜2.0@dev”
我有这个错误:
Problem 1
- friendsofsymfony/comment-bundle v2.0.4 requires jms/serializer 1.0.*@dev -> no matching package found.
- don't install friendsofsymfony/comment-bundle 2.0.x-dev|install friendsofsymfony/comment-bundle dev-master
- Conclusion: don't install friendsofsymfony/comment-bundle dev-master
- Conclusion: remove symfony/symfony v2.3.7
- Conclusion: don't install symfony/symfony v2.3.7
- Conclusion: don't install symfony/symfony v2.3.6
- Conclusion: don't install symfony/symfony v2.3.5
- Conclusion: don't install symfony/symfony v2.3.4
- Conclusion: don't install symfony/symfony v2.3.3
- Installation request for symfony/framework-standard-edition 2.3.x-dev -> satisfiable by symfony/framework-standard-edition[2.3.x-dev].
- Conclusion: don't install symfony/symfony v2.3.2
- Installation request for friendsofsymfony/rest-bundle 0.12.0 -> satisfiable by friendsofsymfony/rest-bundle[0.12.0].
- symfony/framework-standard-edition 2.3.x-dev requires friendsofsymfony/comment-bundle ~2.0@dev -> satisfiable by friendsofsymfony/comment-bundle[2.0.x-dev, v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5].
- friendsofsymfony/comment-bundle v2.0.0 requires symfony/symfony 2.1.* -> satisfiable by symfony/symfony[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].
- friendsofsymfony/comment-bundle v2.0.1 requires symfony/symfony 2.1.* -> satisfiable by symfony/symfony[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].
- friendsofsymfony/comment-bundle v2.0.2 requires symfony/symfony 2.1.*@stable -> satisfiable by symfony/symfony[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].
- friendsofsymfony/comment-bundle v2.0.3 requires symfony/symfony 2.1.*@stable -> satisfiable by symfony/symfony[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].
- friendsofsymfony/comment-bundle v2.0.5 requires symfony/symfony >=2.1,<2.3-dev -> satisfiable by symfony/symfony[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.0].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.1].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.10].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.11].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.12].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.13].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.2].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.3].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.4].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.5].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.6].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.7].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.8].
- Can only install one of: symfony/symfony[v2.3.0, v2.1.9].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.0].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.1].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.10].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.11].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.2].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.3].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.4].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.5].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.6].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.7].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.8].
- Can only install one of: symfony/symfony[v2.3.0, v2.2.9].
- symfony/framework-standard-edition 2.3.x-dev requires symfony/symfony 2.3.* -> satisfiable by symfony/symfony[v2.3.7, v2.3.0, v2.3.1, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.3.6].
- Conclusion: don't install symfony/symfony v2.3.1