I'm trying to install sonata ecommerce , but when i run composer update, i have this Error:
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].
This is my composer 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"
}
}
}
i tried to replaced "knplabs/knp-menu-bundle": "~2.0", by knplabs/knp-menu-bundle": "2.0.#dev", but i'm still having an error.
Someone have any idea how to solved my problem. Thank you :)
Important lines from the error message:
Installation request for sonata-project/ecommerce dev-master
sonata-project/ecommerce dev-master requires knplabs/knp-menu-bundle ~1.1
Installation request for knplabs/knp-menu-bundle ~2.0
So you require knplabs/knp-menu-bundle ~2.0, while sonata ecommerce requires version ~1.1. There is no version that matches both >=1.1,<2.0 and >=2.0,<3.0, resulting in a resolving conflict.
So either find a KnpMenuBundle 2 supporting version of Sonata ecommerce or downgrade to KnpMenuBundle 1 in your application.
Related
I'm trying to install Admin Bundle but it doesn't work and I don't know why,
Help me please!
$ composer require sonata-project/admin-bundle
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20131226/php_intl.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20131226/php_intl.dll, 9): image not found in Unknown on line 0
Using version ^3.20 for sonata-project/admin-bundle
./composer.json has been updated
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
- The requested package sonata-bundle/admin-bundle could not be found in any version, there may be a typo in the package name.
Problem 2
- Conclusion: remove jms/di-extra-bundle 1.5.x-dev
- sonata-project/admin-bundle 3.20.0 conflicts with jms/di-extra-bundle[1.5.x-dev].
- sonata-project/admin-bundle 3.20.1 conflicts with jms/di-extra-bundle[1.5.x-dev].
- Installation request for jms/di-extra-bundle (locked at 1.5.x-dev, required as dev-master) -> satisfiable by jms/di-extra-bundle[1.5.x-dev].
- Installation request for sonata-project/admin-bundle ^3.20 -> satisfiable by sonata-project/admin-bundle[3.20.0, 3.20.1].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
There is my composer.json
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": {
"": "src/"
}
},
"repositories": [
{
"type": "git",
"url": "https://github.com/DEVCKS/CKS-USER.git"
},
{
"type": "git",
"url": "https://github.com/DEVCKS/CKS-CORE.git"
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.4.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"stof/doctrine-extensions-bundle": "~1.1#dev",
"beberlei/DoctrineExtensions": "*",
"sonata-bundle/admin-bundle": "*",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"awstudio/core-bundle": "dev-master",
"friendsofsymfony/user-bundle": "dev-master",
"jms/security-extra-bundle": "dev-master",
"knplabs/knp-paginator-bundle": "~2.4",
"friendsofsymfony/jsrouting-bundle": "~1.1",
"jms/serializer-bundle": "#stable",
"jms/twig-js-bundle" : "dev-master",
"jms/twig-js": "dev-master",
"liuggio/excelbundle": "2.0",
"raulfraile/ladybug-bundle": "~1.0",
"jms/di-extra-bundle": "dev-master",
"doctrine/migrations": "1.0.*#dev",
"doctrine/doctrine-migrations-bundle": "2.1.*#dev",
"fresh/doctrine-enum-bundle": "v2.5",
"corley/maintenance-bundle": "^0.1.7"
},
"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"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.4-dev"
}
}
}
The "sonata-bundle/admin-bundle": "*", line is present in your composer.json file, but that package does not exist (causing Problem 1). Remove it
jms/di-extra-bundle is required to be installed according to your composer.json file, but sonata-project/admin-bundle specifically disallows that package to be installed (see: GH-4292). It looks like, at this time, you'll need to choose either AdminBundle or JMSDiExtraBundle to use.
I encountered this error while installing composer for my project.
Here is my composer.json
{
"name": "accessleader/project",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-0": {
"": "src/",
"SymfonyStandard": "app/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.4.26",
"symfony/symfony": "2.6.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "1.0.1",
"symfony/assetic-bundle": "~2.3",
"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",
"knplabs/knp-paginator-bundle": "dev-master",
"friendsofsymfony/user-bundle": "1.3.5",
"adesigns/calendar-bundle" : "dev-master",
"friendsofsymfony/jsrouting-bundle" : "1.5.4",
"liip/imagine-bundle" : "dev-master",
"jordillonch/crud-generator" : "dev-master",
"stof/doctrine-extensions-bundle": "~1.1#dev",
"kms/froala-editor-bundle": "dev-master",
"webfactory/exceptions-bundle" : "dev-master",
"lexik/translation-bundle": "~2.0",
"jms/i18n-routing-bundle": "dev-master",
"hwi/oauth-bundle": "dev-master",
"liuggio/excelbundle": "^2.0",
"a2lix/translation-form-bundle": "dev-master",
"besimple/i18n-routing-bundle": "dev-master",
"knplabs/doctrine-behaviors": "~1.1",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"unifik/database-config-bundle": "dev-master",
"beelab/recaptcha2-bundle": "^0.1.0",
"dario_swain/ds-recaptcha-bundle": "dev-master",
"avocode/form-extensions-bundle": "dev-master",
"gos/web-socket-bundle": "~1.0",
"knplabs/knp-snappy-bundle": "^1.4"
},
"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",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"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",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/DataBase/parameters.yml"
}
}
}
I am getting this error :
Problem 1
Installation request for twig/extensions 1.0.1 -> satisfiable by twig/extensions[v1.0.1].
avocode/form-extensions-bundle dev-master requires twig/extensions ~1.2 -> satisfiable by twig/extensions[1.4.x-dev].
Can only install one of: twig/extensions[v1.0.1, 1.4.x-dev].
Installation request for avocode/form-extensions-bundle dev-master -> satisfiable by avocode/form-extensions-bundle[dev-master].
You have pinned twig/extensions to version 1.0.1 but avocode/form-extension-bundle needs at least version 1.2 of the extensions to work. With a pinned version, other packages are not allowed to require a higher version.
"require":
"twig/extensions": "1.0.1",
In order to resolve the dependency conflict you should require a higher, non-fixed version (i.e. allow all versions up to, but not including v2.0) than the one that your new dependency needs like this:
composer require 'twig/extensions:~1.2'
Alternatively you can remove the explicit dependency with twig/extensions because it is already a dependency of your new package and will be installed together with this package anyways:
composer remove 'twig/extensions'
Afterwards install your desired bundle:
composer require 'avocode/form-extensions-bundle:dev-master'
i'm trying to configure sonataUserBundle and fosUserBundle. when i try to access to my profile page , i got this error :
Attempted to call an undefined method named "setCurrentUri" of class "Knp\Menu\MenuItem".
Did you mean to call "setCurrent"?
In my composer.json in have this version of "knplabs/knp-menu-bundle": "~2.0",
I downgraded to version "knplabs/knp-menu-bundle": "~1.1". but when i tried to update composer i got a error that says :
Problem 1
- sonata-project/admin-bundle 2.4.x-dev requires knplabs/knp-menu-bundle >=2
.0,<3.0.0 -> no matching package found.
- sonata-project/admin-bundle 2.4.x-dev requires knplabs/knp-menu >=2.0,<3.0
-> no matching package found.
- Installation request for sonata-project/admin-bundle ~2.4#dev -> satisfiab
le by sonata-project/admin-bundle[2.4.x-dev].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your min
imum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f
or more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further commo
n problems.
Someone have any idea how to solve this error ?
Call to method setCurrentUri fails in Symfony/SonataUserBundle setup
Thank you
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"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",
"sonata-project/user-bundle": "2.2.4",
"sonata-project/core-bundle": "~2.3#dev,>=2.3.1",
"sonata-project/block-bundle": "~2.3#dev",
"sonata-project/page-bundle": "~2.3",
"symfony-cmf/routing-bundle": "~1.1",
"knplabs/knp-menu-bundle": "~2.0",
"sonata-project/admin-bundle": "~2.4#dev",
"sonata-project/doctrine-orm-admin-bundle": "~2.4#dev",
"sonata-project/easy-extends-bundle": "~2.1"
},
"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"
}
}
}
I had the same problem but downgrade to Knpmenu version 1 is not possible for our project. Because of some code update the June 16th, we can now use Sonata User Bundle and Knp Menu Version 2.
Please, have a look on my composer.json :
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"doctrine/migrations": "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "~1.3",
"friendsofsymfony/message-bundle": "^1.2",
"sonata-project/admin-bundle": "^2.3",
"sonata-project/doctrine-orm-admin-bundle": "^2.3",
"sonata-project/easy-extends-bundle": "^2.1",
"sonata-project/user-bundle": "dev-master",
"sonata-project/datagrid-bundle": "dev-master",
"sonata-project/block-bundle": "~2.2,>=2.2.7,<2.3",
"sonata-project/exporter": "^1.4",
"sonata-project/intl-bundle": "^2.2",
"knplabs/knp-menu-bundle": "~2.0",
"knplabs/knp-menu": "~2.0"
},
As you can see, sonata-project/user-bundle is under dev-master version and I had to add sonata-project/datagrid-bundle in dev-master
Hope to help you !
hat versions of KnpMenu and SonataBlockBundle are you using? Please check your composer.json to be sure.
The setCurrentUri method has been deprecated as of KnpMenu v. 2.0, and the composer.json of SonataBlockBundle does not require KnpMenu anywhere but in dev install. So, this leads to a possibility that you could have required a fresher version of knplabs/knp-menu-bundle that is not yet supported by Sonata bundle.
Try requiring knplabs/knp-menu-bundle in 1.1.x:
{
...
"require": {
"knplabs/knp-menu-bundle": "~1.1"
},
...
}
I have a new project and I want to try out sonata Ecommerce bundle. I removed all the vendors to do a clean composer install, but when I do php composer.phar install I get this error:
$ php composer.phar install
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "composer.phar self-update" to get the latest version.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for symfony/framework-standard-edition 2.6.x-dev -> satisfiable by symfony/framework-standard-edition[2.6.x-dev].
- symfony/framework-standard-edition 2.6.x-dev requires sonata-project/ecommerce 2.3-dev -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
This is my composer.json:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.6.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~3.0.12",
"sensio/framework-extra-bundle": "~3.0",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "~1.3",
"sonata-project/core-bundle": "dev-master",
"sonata-project/ecommerce": "2.3#dev",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/easy-extends-bundle": "dev-master",
"sonata-project/user-bundle": "dev-master",
"sonata-project/datagrid-bundle": "dev-master",
"knplabs/knp-menu": "2.*",
"sonata-project/classification-bundle": "dev-master",
"jms/serializer-bundle": "~0.11",
"sonata-project/media-bundle": "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master",
"doctrine/migrations": "dev-master",
"ddeboer/data-import-bundle": "dev-master",
"braincrafted/bootstrap-bundle": "dev-master",
"twitter/bootstrap": "3.3.*",
"symfony/property-access": "~2.6",
"knplabs/knp-paginator-bundle": "~2.4",
"sonata-project/translation-bundle": "~1.0"
},
"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",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.6-dev"
}
}
}
Even if I do
"require": {
"sonata-project/ecommerce": "2.3#dev",
},
I get the same problem... I tried, both, 2.3#dev and dev-master. It didnt help. But without this ecommerce require the composer installs without any errors.. What is wrong here?
I was able to install the dependencies by starting from a new composer.json file:
$ composer create-project symfony/framework-standard-edition "2.6" "2.6.*" --no-interaction -v
I added the "sonata-project/ecommerce": "dev-master" dependency and "minimum-stability": "dev" to the composer.json file. Then composer update worked perfectly.
Then I started adding the dependencies from your question but it failed with all the dependencies, so I think there is a compatibility problem between packages.
Here is the full composer.json file:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.6.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"sonata-project/ecommerce": "dev-master",
"friendsofsymfony/user-bundle": "~1.3"
},
"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",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"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",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.6-dev"
}
},
"minimum-stability": "dev"
}
Edit: I was able to install the dependencies from the composer.json file from the question by:
remove the sonata-project and "knplabs/knp-menu": "2.*", requirements
add "sonata-project/ecommerce": "dev-master",
add "minimum-stability": "dev"
I am trying to upgrade from Symfony2.1.7 to Symfony2.3 stable release. I am using php composer.phar update But I am facing package dependency problems. Below is link to my composer.json and the command line output.
composer.json And command line output
After looking at the output I can see friendsofsymfony/user-bundle dependency
friendsofsymfony/user-bundle 2.0.x-dev requires symfony/security-bundle >=2.1,<2.3-dev
And something similar for sonata-project/user-bundle
- symfony/framework-standard-edition 2.3.x-dev requires sonata-project/user-bundle dev-master -> satisfiable by sonata-project/user-bundle[dev-master].
- sonata-project/user-bundle dev-master requires friendsofsymfony/user-bundle 1.3.* -> satisfiable by friendsofsymfony/user-bundle[1.3.x-dev, v1.3.0, v1.3.1, v1.3.2].
- sonata-project/user-bundle dev-master requires friendsofsymfony/user-bundle 1.3.* -> satisfiable by friendsofsymfony/user-bundle[1.3.x-dev, v1.3.0, v1.3.1, v1.3.2].
So seems it needs symfony/security-bundle >=2.1,<2.3-dev but I want it to be 2.3 or above is it like I can not upgrade with these bundle.
Can someone guide me in right direction, If I am missing something?
Here is my complete composer.json which works with Symfony version 2.3.2-DEV - app/dev/debug
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": {
"": "src/"
}
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*#dev",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "dev-master",
"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",
"jms/security-extra-bundle": "1.5.*",
"jms/di-extra-bundle": "1.4.*",
"kriswallsmith/assetic": "1.1.*#dev",
"mlehner/gelf-php": "v1.0",
"doctrine/migrations": "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master",
"stof/doctrine-extensions-bundle": "1.1.*#dev",
"sensiolabs/doctrine-query-statistics-bundle": "1.0.*#dev",
"jms/serializer-bundle": "0.9.x",
"sonata-project/jquery-bundle": "1.8.*#dev",
"sonata-project/exporter": "1.1.*",
"sonata-project/admin-bundle": "2.2.*#dev",
"sonata-project/cache-bundle": "2.1.*#dev",
"sonata-project/intl-bundle": "2.2.*#dev",
"sonata-project/doctrine-orm-admin-bundle": "2.2.*#dev",
"sonata-project/cache-bundle": "dev-master",
"sonata-project/easy-extends-bundle": "dev-master",
"sonata-project/user-bundle": "2.2.*#dev",
"sonata-project/block-bundle": "dev-master",
"sonata-project/markitup-bundle": "dev-master",
"sonata-project/formatter-bundle": "dev-master",
"sonata-project/doctrine-extensions": "1.0.0",
"friendsofsymfony/user-bundle": "1.3.*#dev",
"knplabs/knp-paginator-bundle": "dev-master",
"liip/monitor": "0.5.*#dev",
"liip/monitor-bundle": "0.5.*#dev",
"mockery/mockery": "0.7.2",
"aws/aws-sdk-php": "2.0.3",
"zendframework/zend-barcode": "2.0.*",
"zendframework/zend-validator": "2.0.*",
"egulias/listeners-debug-command-bundle": "*",
"kylecannon/easycsv": "dev-master",
"predis/predis": "0.8.*#dev"
},
"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.2-dev",
"dev-master": "2.3-dev"
}
}
}