I'm trying to upgrade from 2.1 to 2.3 but getting composer error:
Your requirements could not be resolved to an installable set of packages.
I tried to upgrade just the framework first without bundles by replacing "symfony/symfony": "2.1." with "symfony/symfony": "2.3." in composer.json and running
php composer.phar update symfony/symfony
it didn't work so I tried to update jms/security-extra-bundle first, but it didn't work
php composer.phar update
didn't work neither, I teied "symfony/symfony": "2.2.*" as well
here my composer.json, what should I change?
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.0.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.1.*",
"symfony/monolog-bundle": "2.1.*",
"sensio/distribution-bundle": "2.1.*",
"sensio/framework-extra-bundle": "2.1.*",
"sensio/generator-bundle": "2.1.*",
"jms/security-extra-bundle": "dev-master",
"jms/di-extra-bundle": "dev-master",
"jms/serializer-bundle": "dev-master",
"friendsofsymfony/user-bundle": "*",
"vich/geographical-bundle": "*",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"friendsofsymfony/rest-bundle": "*",
"friendsofsymfony/comment-bundle": "*",
"friendsofsymfony/jsrouting-bundle": "1.0.3",
"servergrove/shell-alias-bundle": "dev-master",
"beberlei/DoctrineExtensions": "dev-master",
"stof/doctrine-extensions-bundle": "dev-master"
},
"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"
]
},
"minimum-stability": "dev",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install":"symlink"
}
}
Change the version constraints for the following packages to 2.3:
symfony/symfony
doctrine/doctrine-bundle
symfony/assetic-bundle
symfony/swiftmailer-bundle
symfony/monolog-bundle
sensio/distribution-bundle
sensio/framework-extra-bundle
sensio/generator-bundle
And the other packages as such
friendsofsymfony/jsrouting-bundle: 1.5.*
You'll also need to add the following packages:
incenteev/composer-parameter-handler
The post-install-cmd and post-update-cmd arrays would then need as the first command
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
A config.bin-dir definition should be provided for vendor executables
"config": {
"bin-dir": "bin"
},
Since Symfony 2.3 is an LTS version (Long Term Support), you can either change the minimum-stability setting to stable or prefer stable packages if they are available
"prefer-stable": true,
So your composer.json file should look like this:
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"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": "dev-master",
"jms/di-extra-bundle": "dev-master",
"jms/serializer-bundle": "dev-master",
"friendsofsymfony/user-bundle": "*",
"vich/geographical-bundle": "*",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"friendsofsymfony/rest-bundle": "*",
"friendsofsymfony/comment-bundle": "*",
"friendsofsymfony/jsrouting-bundle": "1.5.*",
"servergrove/shell-alias-bundle": "dev-master",
"beberlei/DoctrineExtensions": "dev-master",
"stof/doctrine-extensions-bundle": "dev-master"
},
"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"
]
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "symlink"
}
}
Related
I need help, I've just take care of new project so I follow the process to install in my local and at the end of the install I got a circular reference error with Symfony 2.8.
To install the project in my local I run the command:
composer install
after enter, all information needed to install I got this error:
Circular reference detected for service 'knp_menu.matcher', path: 'knp_menu.matcher -> sonata.admin.menu.matcher.voter.children -> knp_menu.matcher'.
I don't know how to fix my problem. Could you help me please.
i found the solution.
I've to comment these line in this file:
/vendor/sonata-project/admin-bundle/Resources/config/menu.xml
<service id="sonata.admin.menu.matcher.voter.children" class="Sonata\AdminBundle\Menu\Matcher\Voter\ChildrenVoter">
<argument type="service" id="knp_menu.matcher"/>
<tag name="knp_menu.voter"/>
</service>
I share with you the composer.json. I think the problem come from deprecated version of different lib. But I can identify witch one
{
"name": "tarik/sonatacms",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/",
"SymfonyStandard\\": "app/SymfonyStandard/"
}
},
"require": {
"php": ">=7.0.3",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"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",
"sonata-project/core-bundle": "3.10.*",
"sonata-project/admin-bundle": "3.0.*",
"sonata-project/doctrine-orm-admin-bundle": "3.0.*",
"sonata-project/user-bundle": "3.0.*",
"sonata-project/datagrid-bundle": "2.3.1",
"sonata-project/easy-extends-bundle": "^2.1",
"sonata-project/intl-bundle": "^2.2",
"sonata-project/classification-bundle": "3.0.0",
"sonata-project/media-bundle": "3.0.0",
"jms/serializer-bundle": "^1.0",
"stof/doctrine-extensions-bundle": "^1.2",
"tilleuls/ckeditor-sonata-media-bundle": "1.0.5",
"egeloen/ckeditor-bundle": "4.0.*",
"ibrows/sonata-translation-bundle" : "1.0.*",
"sonata-project/block-bundle": "3.10.*",
"sonata-project/cache-bundle": "^2.2",
"sonata-project/seo-bundle": "^2.0",
"sonata-project/notification-bundle": "3.0.*",
"symfony-cmf/routing-bundle": "~1.1",
"sonata-project/page-bundle": "3.0.*",
"sonata-project/formatter-bundle": "3.2.1",
"videlalvaro/php-amqplib": "^2.6",
"liip/monitor-bundle": "^2.3",
"liip/imagine-bundle": "^1.3",
"sonata-project/news-bundle": "3.10.* || 3.0.*",
"symfony-cmf/core-bundle": "^1.2",
"sonata-project/timeline-bundle": "3.0.*",
"sonata-project/translation-bundle": "2.0.2",
"hwi/oauth-bundle": "^0.4.0",
"beberlei/DoctrineExtensions": "^1.0",
"friendsofsymfony/elastica-bundle": "^3.1",
"knplabs/knp-snappy-bundle": "^1.4",
"h4cc/wkhtmltopdf-amd64": "0.12.x",
"h4cc/wkhtmltopdf-i386": "0.12.x",
"friendsofsymfony/comment-bundle": "^2.0",
"sonata-project/comment-bundle": "3.0.0",
"knplabs/knp-paginator-bundle": "2.4.2",
"kptive/payment-sips-bundle": "^1.0",
"symfony/var-dumper": "^3.1",
"herzult/forum-bundle": "dev-master",
"codeconsortium/ccdn-forum-bundle": "dev-master"
},
"require-dev": {
"sensio/generator-bundle": "~2.3",
"doctrine/doctrine-fixtures-bundle": "^2.3",
"hautelook/alice-bundle": "^1.2"
},
"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"
}
}
}
I need to update to Doctrine 2.5 for a bundle which requires it (Vich\UploaderBundle). However I am facing two difficulties:
How do I know which Doctrine version is compatible with my Symfony 2.8 setup
How do I actually run the upgrade
Composer management is still quite obscure to me, especially the output you get when you try to update.
Here is my current composer.json:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": { "": "src/" },
"files": ["app/AppKernel.php"]
},
"require": {
"php": ">=7.0",
"symfony/symfony": "2.8.*",
"twig/extensions": "1.0.*",
"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.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "1.2.*",
"doctrine/migrations": "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master",
"doctrine/doctrine-fixtures-bundle": "dev-master"
"incenteev/composer-parameter-handler": "~2.0",
"apy/datagrid-bundle": "dev-master",
"pagerfanta/pagerfanta": "dev-master",
"white-october/pagerfanta-bundle": "dev-master",
"idci/admin-generator-bundle": "dev-master",
"mopa/bootstrap-bundle": "dev-master",
"twbs/bootstrap": "v3.2.0",
"knplabs/knp-paginator-bundle": "dev-master",
"knplabs/knp-menu-bundle": "dev-master",
"craue/formflow-bundle": "dev-master",
"friendsofsymfony/user-bundle": "~2.0#dev",
"liuggio/excelbundle": "~2.0",
"excelwebzone/recaptcha-bundle": "~2.3",
"robertotru/to-inline-style-email-bundle": "dev-master",
},
"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": "dev",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"require-dev": {
}
}
[EDIT]
Specified require doctrine version.
I also have the feeling that this composer.json needs to be cleaned up somehow but that's another question...
Your problem seem to come from this strict restriction on the dependency : "doctrine/doctrine-bundle": "1.2.*" which require "doctrine/orm" < 2.5 (see here : https://packagist.org/packages/doctrine/doctrine-bundle#v1.2.0)
The solution might be to upgrade the version of this first dependency to
"doctrine/doctrine-bundle": "^1.6"
I didn't check the compatibility with all others packages so i'm not completly sure but you still can try.
when i try to install sonata ecommerce with composer.phar update
error [runtimeExeption] Could not load package
orange-opensource/orange-boosted-bootstrap in http://packagist.org:
[unexpectedValueException] Could not parse version constraint
v4.0.0-alpha.3.1 Invalid version string "v4.0.0-alpha.3.1" .
composer.json
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": {
"": "src/"
}
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.7.*",
"doctrine/orm": "~2.4,>=2.4.5",
"doctrine/doctrine-bundle": "1.5.*",
"twig/extensions": "1.2.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/security": "#stable",
"symfony/monolog-bundle": "#stable",
"sensio/distribution-bundle": "4.0.*",
"sensio/framework-extra-bundle": "3.0.*",
"sensio/generator-bundle": "2.3.*",
"leafo/lessphp": "*",
"twitter/bootstrap": "*",
"friendsofsymfony/jsrouting-bundle": "#stable",
"friendsofsymfony/user-bundle": "#stable",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/comment-bundle":"#stable",
"sonata-project/core-bundle": "#stable",
"sonata-project/media-bundle": "2.3.3",
"sonata-project/admin-bundle": "#stable",
"sonata-project/doctrine-orm-admin-bundle": "#stable",
"knplabs/knp-paginator-bundle": "#stable",
"sonata-project/translation-bundle": "~1",
"a2lix/translation-form-bundle": "1.*#dev",
"a2lix/i18n-doctrine-bundle": "^0.1.0",
"jordillonch/crud-generator": "dev-master",
"knplabs/doctrine-behaviors": "#stable",
"doctrine/doctrine-fixtures-bundle": "#stable",
"sonata-project/user-bundle": "#stable",
"fp/jsformvalidator-bundle":"#stable",
"ensepar/html2pdf-bundle" : "#stable",
"sonata-project/ecommerce": "#stable",
"ibrows/newsletter-bundle": "*"
},
"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.3-dev"
}
}
}
Your composer.json file seems fine - I was able to run it with "composer.phar update" without any issue.
Try updating composer with "composer.phar self-update" and clearing it's cache with "composer.phar clear-cache".
I have problem to install sonata-userbundle when I run php composer.phar update I get this error :
Problem 1
- Installation request for sonata-project/user-bundle 2.1.x-dev -> satisfiable by sonata-project/user-bundle[2.1.x-dev].
- sonata-project/user-bundle 2.1.x-dev requires sonata-project/doctrine-extensions 1.* -> satisfiable by sonata-project/doctrine-extensions[1.0.0, 1.0.1].
- Can only install one of: sonata-project/doctrine-extensions[dev-master, 1.0.0].
- Can only install one of: sonata-project/doctrine-extensions[dev-master, 1.0.1].
- Installation request for sonata-project/doctrine-extensions dev-master -> satisfiable by sonata-project/doctrine-extensions[dev-master].
I hoped to install vendor in my project and I get the same error everytime when I tried to change the version of bundles, and here my composer.json :
{
"name": "12digital/base-symfony",
"description": "A Symfony based project made by 12digital.com",
"homepage": "http://www.12digital.com",
"autoload": {
"psr-0": {
"": "src/"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/brainwasher/StofDoctrineExtensionsBundle.git"
},
{
"type": "vcs",
"url": "https://github.com/brainwasher/DoctrineExtensions.git"
},
{
"type":"vcs",
"url":"https://github.com/Nekland/FeedBundle.git"
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.1.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.1.*",
"symfony/monolog-bundle": "2.1.*",
"sensio/distribution-bundle": "2.1.*",
"sensio/framework-extra-bundle": "2.1.*",
"sensio/generator-bundle": "2.1.*",
"jms/security-extra-bundle": "1.2.*",
"jms/di-extra-bundle": "1.1.*",
"sonata-project/admin-bundle": "2.1.x",
"sonata-project/block-bundle": "2.2.*#dev",
"sonata-project/cache-bundle": "dev-master",
"sonata-project/jquery-bundle": "dev-master",
"knplabs/knp-menu-bundle": "1.1.x-dev",
"knplabs/knp-menu": "1.1.x-dev",
"sonata-project/exporter": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "2.1.x",
"sonata-project/user-bundle": "2.1.x-dev",
"sonata-project/easy-extends-bundle": "dev-master",
"friendsofsymfony/user-bundle": "v1.3.1 as dev-master",
"sonata-project/doctrine-extensions": "dev-master",
"zetacomponents/base": "1.8",
"gedmo/doctrine-extensions": "2.3.*",
"stof/doctrine-extensions-bundle": "dev-master",
"genemu/form-bundle": "2.1.x-dev",
"nekland/feed-bundle": "dev-master",
"dannytrue/phpthumb": "2.0.*",
"jms/job-queue-bundle": "dev-master",
"pagerfanta/pagerfanta": "dev-master",
"stfalcon/tinymce-bundle": "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master",
"nelmio/solarium-bundle": "2.*",
"knplabs/knp-paginator-bundle": "dev-master",
"jms/payment-core-bundle": "*",
"jms/payment-paypal-bundle": "*",
"excelwebzone/recaptcha-bundle": "*"
},
"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"
]
},
"minimum-stability": "dev",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "symlink"
}
}
Anyone have an Idea how to fix this?
In order to resolve the conflict change ...
"sonata-project/doctrine-extensions": "dev-master",
to
"sonata-project/doctrine-extensions": "1.*",
... or just remove the line completely and let composer fetch the right dependency.
the dev-master branch of sonata-project/doctrine-extensions is not compatible with sonata-project/user-bundle 2.1.x-dev.
That's what composer is telling you in the error message.
So I'm having issues trying to get composer to work again after installing the Sonata Admin Bundle on Symfony2. When using the command php composer.phar ...., I get the following error message: [UnexpectedValueException] Could not parse version constraint composer.phar: Invalid version string "composer.phar"
It doesn't matter what action I do with composer, it always produces that error. Well, one exception is php composer.phar require --no-update sonata-project/media-bundle says it updated composer.json with no error message, but didn't actually install anything.
So far I have just removed and reinstalled composer.phar with an updated version. I'm running Symfony 2.2.1-dev on Mac OS 10.7.5 with MAMP and PHP 5.4.4. Not sure if this is related, but I also cannot clear the cache using php app/console cache:clear anymore either. I have to delete the cache via Finder.
Here's my composer.json file just in case:
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": "composer.phar",
"symfony/symfony": "2.2.*",
"doctrine/orm": "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.*",
"sonata-project/cache-bundle": "dev-master",
"sonata-project/block-bundle": "dev-master",
"sonata-project/jquery-bundle": "1.8.*",
"knplabs/knp-menu-bundle": "1.1.*-dev",
"sonata-project/exporter": "1.1.*",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"doctrine/common": "2.3.x-dev",
"sonata-project/media-bundle": "dev-master"
},
"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": "dev",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"branch-alias": {
"dev-master": "2.2-dev"
}
}
Any help/advice would be great :)
Looks like you have some typos in your composer file.
Replace "php": "composer.phar" with "php": ">=5.3.3" and add the missing closing bracket at the end of your file :
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.2.*",
"doctrine/orm": "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.*",
"sonata-project/cache-bundle": "dev-master",
"sonata-project/block-bundle": "dev-master",
"sonata-project/jquery-bundle": "1.8.*",
"knplabs/knp-menu-bundle": "1.1.*-dev",
"sonata-project/exporter": "1.1.*",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"doctrine/common": "2.3.x-dev",
"sonata-project/media-bundle": "dev-master"
},
"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": "dev",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"branch-alias": {
"dev-master": "2.2-dev"
}
}
}