我在安装 Symfony 2.3.7 时遇到依赖问题。这是一个全新的 Symfony 安装,下载 2.3.7,没有 Vendors zip。运行 composer update 进行初始安装。然后将注释包添加到 composer.json 并再次运行 composer update。
composer.json 的 require 部分,
"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",
"friendsofsymfony/comment-bundle": "2.0.5"
},
以及来自“php composer.phar update”的错误
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- 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
- Conclusion: don't install symfony/symfony v2.3.1
- 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.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.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].
- Installation request for symfony/symfony 2.3.* -> satisfiable by symfony/symfony[v2.3.0, v2.3.1, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.3.6, v2.3.7].