我正在尝试安装奏鸣曲电子商务,但是当我运行作曲家更新时,我有这个错误:
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
- Can only install one of: knplabs/knp-menu-bundle[2.1.x-dev, 1.1.x-dev].
- Can only install one of: knplabs/knp-menu-bundle[v2.0.0, 1.1.x-dev].
- Can only install one of: knplabs/knp-menu-bundle[v2.0.0-alpha1, 1.1.x-dev]
.
- Can only install one of: knplabs/knp-menu-bundle[v2.0.0-alpha2, 1.1.x-dev]
.
- Can only install one of: knplabs/knp-menu-bundle[v2.1.0, 1.1.x-dev].
- Can only install one of: knplabs/knp-menu-bundle[1.1.x-dev, v2.1.0].
- sonata-project/ecommerce dev-master requires knplabs/knp-menu-bundle ~1.1
-> satisfiable by knplabs/knp-menu-bundle[1.1.x-dev].
- Installation request for sonata-project/ecommerce dev-master -> satisfiabl
e by sonata-project/ecommerce[dev-master].
- Installation request for knplabs/knp-menu-bundle ~2.0 -> satisfiable by kn
plabs/knp-menu-bundle[2.1.x-dev, v2.0.0, v2.0.0-alpha1, v2.0.0-alpha2, v2.1.0].
这是我的作曲家json
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.4",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "2.6.0",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~3.0,>=3.0.12",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"leafo/lessphp": "*",
"twitter/bootstrap": "*",
"mremi/contact-bundle": "dev-master",
"symfony/twig-bridge": "2.3.*",
"genemu/form-bundle": "2.2.*",
"components/jquery":"dev-master",
"friendsofsymfony/user-bundle": "~1.3",
"hwi/oauth-bundle": "0.4.*@dev",
"knplabs/gaufrette": "~0.1.6",
"knplabs/knp-menu-bundle": "~2.0",
"sonata-project/user-bundle": "2.3.*@dev",
"sonata-project/block-bundle": "~2.3@dev",
"sonata-project/admin-bundle": "~2.4@dev",
"sonata-project/page-bundle": "~2.3",
"sonata-project/datagrid-bundle": "2.2.*@dev",
"symfony-cmf/routing-bundle": "~1.1",
"sonata-project/core-bundle": "~2.2@dev",
"sonata-project/doctrine-orm-admin-bundle": "~2.2",
"sonata-project/easy-extends-bundle": "~2.1",
"sonata-project/comment-bundle": "~2.2@dev",
"sonata-project/ecommerce": "dev-master"
},
"require-dev": {
"sensio/generator-bundle": "~2.3"
},
"scripts": {
"post-root-package-install": [
"SymfonyStandard\\Composer::hookRootPackageInstall"
],
"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",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
],
"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",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"symfony-assets-install":"symlink",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.7-dev"
}
}
}
我试图用knplabs / knp-menu-bundle“:”2.0。@ dev“替换”knplabs / knp-menu-bundle“:”~2.0“,但我仍然有错误。
有人知道如何解决我的问题。谢谢:))
答案 0 :(得分:0)
错误消息中的重要行:
因此,您需要knplabs/knp-menu-bundle
~2.0
,而奏鸣曲电子商务需要版本~1.1
。没有与>=1.1,<2.0
和>=2.0,<3.0
匹配的版本,从而导致解决冲突。
因此,要么在您的应用程序中找到支持Sonata电子商务的KnpMenuBundle 2或降级到KnpMenuBundle 1。