Я пытаюсь установить сонату электронной коммерции, но когда я запускаю обновление композитора, у меня появляется эта ошибка:
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» на knplabs / knp-menu-bundle «:» 2.0. @ dev «, но у меня все еще есть ошибка.
У кого-то есть идеи, как решить мою проблему. Спасибо 🙂
Важные строки из сообщения об ошибке:
Итак, вы требуете knplabs/knp-menu-bundle
~2.0
, а соната для электронной коммерции требует версии ~1.1
, Там нет версии, которая соответствует обоим >=1.1,<2.0
а также >=2.0,<3.0
, что приводит к разрешению конфликта.
Так что либо найдите в своем приложении версию электронной коммерции Sonata, поддерживающую KnpMenuBundle 2, либо понизьте ее до версии KnpMenuBundle 1.
Других решений пока нет …