我会安装Sonata用户捆绑包,但是当我尝试进行作曲家更新时,控制台会返回以下错误:
C:wampwwwextranet>composer 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
- Installation request for sonata-project/doctrine-orm-admin-bundle 2.1.*@de
v -> satisfiable by sonata-project/doctrine-orm-admin-bundle[2.1.x-dev].
- Conclusion: remove symfony/symfony v2.3.1
- sonata-project/doctrine-orm-admin-bundle 2.1.x-dev requires symfony/symfon
y >=2.1,<2.3 -> satisfiable by symfony/symfony[v2.1.0, v2.1.1, v2.1.10, v2.1.11,
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.2, v2.2.3].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.0].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.1].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.10].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.11].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.2].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.3].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.4].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.5].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.6].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.7].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.8].
- Can only install one of: symfony/symfony[v2.3.1, v2.1.9].
- Can only install one of: symfony/symfony[v2.3.1, v2.2.0].
- Can only install one of: symfony/symfony[v2.3.1, v2.2.1].
- Can only install one of: symfony/symfony[v2.3.1, v2.2.2].
- Can only install one of: symfony/symfony[v2.3.1, v2.2.3].
- Installation request for symfony/symfony 2.3.1 -> satisfiable by symfony/s
ymfony[v2.3.1].
这是我的作曲家.json:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The "Symfony Standard Edition" distribution",
"autoload": {
"psr-0": {
"": "src/"
}
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.1",
"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/icu": "1.2.*",
"jms/security-extra-bundle": "dev-master",
"friendsofsymfony/user-bundle": "dev-master",
"sonata-project/block-bundle": "2.1.*",
"sonata-project/admin-bundle": "2.1.*",
"sonata-project/user-bundle": "2.1.*@dev",
"sonata-project/doctrine-orm-admin-bundle": "2.1.*@dev",
"sonata-project/intl-bundle": "2.1.*",
"sonata-project/cache-bundle": "2.1.*"
},
"scripts": {
"post-install-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}
}
我尝试了很多东西(更改版本,接受alpha最小稳定性等(并在很多论坛中搜索了该问题,但是我没有找到解决我问题的解决方案。
您明确列出了旧版本的sonata-project/doctrine-orm-admin-bundle
,并且它与其他库不兼容。
你有这个:
"sonata-project/doctrine-orm-admin-bundle": "2.1.*@dev",
这显然有以下要求:
sonata-project/doctrine-orm-admin-bundle 2.1.x-dev requires symfony/symfony >=2.1,<2.3
除非您绝对需要绝对最新版本,否则您根本不应该@dev
使用,并且您应该使用波浪号来获取最新的标记版本,例如
"sonata-project/doctrine-orm-admin-bundle": "~2.1",
将获得更高>= 2.1 和 <3.0 的最新版本的sonata-project/doctrine-orm-admin-bundle
。