我正在尝试使用composer更新奏鸣曲管理员,但我有这个错误
Problem 1
- Installation request for sonata-project/admin-bundle dev-master -> satisfiable by sonata-project/admin-bundle[dev-master].
- sonata-project/user-bundle 2.2.x-dev requires sonata-project/admin-bundle ~2.2,>=2.2.9 -> satisfiable by sonata-project/admin-bundle[2.2.x-dev, 2.3.x-dev].
- Can only install one of: sonata-project/admin-bundle[dev-master, 2.2.x-dev].
- Can only install one of: sonata-project/admin-bundle[dev-master, 2.3.x-dev].
- Installation request for sonata-project/user-bundle 2.2.x-dev -> satisfiable by sonata-project/user-bundle[2.2.x-dev].
以下是我的composer.json
:
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"sensio/generator-bundle": "dev-master",
"incenteev/composer-parameter-handler": "~2.0",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/user-bundle": "2.2.x-dev"
},
我正在使用此命令:
composer update
答案 0 :(得分:0)
您应该继续packagist查看要求。
您的错误消息说您应该选择要使用的版本,因为user-bundle 2.2
需要sonata-admin v2.2
。
在阅读包装工作者时,我可以看到userbundle 2.3
sonata-admin v2.3
正常
我认为您只需将user-bundle
从2.2
更新为2.3
或者对于未来来说,修复您的软件包版本而不是使用dev-master
会更安全。
如果有更新,它会像现在一样打破所有内容。
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"sensio/generator-bundle": "dev-master",
"incenteev/composer-parameter-handler": "~2.0",
"sonata-project/admin-bundle": "dev-master", // Actually 2.3
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/user-bundle": "2.3.x-dev" // <----- HERE
},