当我尝试运行命令php composer.phar update
时,它会引发这些错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- sonata-project/admin-bundle dev-master requires sensio/generator- bundle ~2.3 -> no matching package found.
- sonata-project/admin-bundle dev-master requires sensio/generator- bundle ~2.3 -> no matching package found.
- Installation request for sonata-project/admin-bundle dev-master -> satisfiable by sonata-project/admin-bundle[dev-master].
这是我的 composer.json 数据:
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": {
"": "src/",
"Mobyt": "vendor/mobyt/mobyt/src/",
"EE": "vendor/ee/dataexporter-bundle/"
}
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.2.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.2.*",
"symfony/monolog-bundle": "2.2.*",
"sensio/distribution-bundle": "2.2.*",
"sensio/framework-extra-bundle": "2.2.*",
"sensio/generator-bundle": "2.2.*",
"jms/security-extra-bundle": "1.4.*",
"jms/di-extra-bundle": "1.3.*",
"symfony/console": "2.2.*@dev",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"doctrine/data-fixtures" : "dev-master",
"friendsofsymfony/user-bundle": "*",
"doctrine/doctrine-migrations-bundle": "dev-master",
"doctrine/migrations": "dev-master",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/intl-bundle": "2.1.*",
"sonata-project/cache-bundle": "2.*",
"sonata-project/block-bundle": "dev-master",
"sonata-project/easy-extends-bundle": "2.1.*",
"sonata-project/doctrine-extensions": "1.*",
"stof/doctrine-extensions-bundle": "~1.1@dev",
"friendsofsymfony/jsrouting-bundle": "~1.1",
"friendsofsymfony/advanced-encoder-bundle": "dev-master",
"knplabs/knp-menu-bundle":"1.1.x-dev",
"jms/serializer": "dev-master",
"sonata-project/user-bundle": "2.2.*@dev"
},
"scripts": {
"post-install-cmd": [
"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": [
"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": "alpha",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"branch-alias": {
"dev-master": "2.2-dev"
}
}
}
如何解决此作曲家更新问题?
答案 0 :(得分:0)
您使用的是Symfony2的过时版本:2.2
。 dev-master
的sonata-project/admin-bundle
分支需要~2.3
sensio/generator-bundle
版本的2.2
,这在Symfony 2.2
中不可用。您应该尝试2.2.x-dev
版本,该版本需要sensio/generator-bundle
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
版本的"sonata-project/admin-bundle": "2.2.*",
"sonata-project/doctrine-orm-admin-bundle": "2.2.*",
。所以你必须编辑 composer.json 文件并替换:
{{1}}
使用:
{{1}}