Symfony update from 2.1 to 2.2 composer error
Asked Answered
H

2

7

I'm trying to update my project from symfony 2.1 to 2.2 . I try to update it package by package. When I type composer.phar update symfony/symfony, I get the following error:

 Problem 1
- Conclusion: don't install symfony/symfony 2.2.x-dev
- Conclusion: don't install symfony/symfony v2.2.0
- Conclusion: don't install symfony/symfony v2.2.0-RC3
- Conclusion: don't install symfony/symfony v2.2.0-RC2
- Installation request for symfony/monolog-bundle == 2.1.9999999.9999999-dev -> satisfiable by symfony/monolog-bundle 2.1.x-dev.
- Conclusion: don't install symfony/symfony v2.2.0-RC1
- Conclusion: don't install symfony/symfony v2.2.0-BETA2
- doctrine/doctrine-bundle v1.2.0-beta1 requires symfony/framework-bundle >=2.2.0-beta2,<2.3-dev -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3, symfony/framework-bundle 2.2.x-dev, symfony/framework-bundle v2.2.0, symfony/framework-bundle v2.2.0-BETA2, symfony/framework-bundle v2.2.0-RC1, symfony/framework-bundle v2.2.0-RC2, symfony/framework-bundle v2.2.0-RC3.
- doctrine/doctrine-bundle 1.2.x-dev requires symfony/framework-bundle >=2.2.0-beta2,<2.3-dev -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3, symfony/framework-bundle 2.2.x-dev, symfony/framework-bundle v2.2.0, symfony/framework-bundle v2.2.0-BETA2, symfony/framework-bundle v2.2.0-RC1, symfony/framework-bundle v2.2.0-RC2, symfony/framework-bundle v2.2.0-RC3.
- don't install symfony/framework-bundle 2.2.x-dev|don't install symfony/symfony v2.2.0-BETA1
- don't install symfony/framework-bundle v2.2.0|don't install symfony/symfony v2.2.0-BETA1
- don't install symfony/framework-bundle v2.2.0-BETA2|don't install symfony/symfony v2.2.0-BETA1
- don't install symfony/framework-bundle v2.2.0-RC1|don't install symfony/symfony v2.2.0-BETA1
- don't install symfony/framework-bundle v2.2.0-RC2|don't install symfony/symfony v2.2.0-BETA1
- don't install symfony/framework-bundle v2.2.0-RC3|don't install symfony/symfony v2.2.0-BETA1
- Installation request for symfony/symfony 2.2.* -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA1, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3.
- Installation request for doctrine/doctrine-bundle 1.2.* -> satisfiable by doctrine/doctrine-bundle 1.2.x-dev, doctrine/doctrine-bundle v1.2.0-beta1.

My composer.json:

{
    "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.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.*",

        "friendsofsymfony/rest": "0.7.0",
        "friendsofsymfony/rest-bundle": "0.9.0",
        "jms/serializer-bundle": "0.9.0",
        "friendsofsymfony/jsrouting-bundle": "1.0.3",
        "friendsofsymfony/user-bundle": "v1.3.0",
        "knplabs/knp-menu-bundle": "dev-master",
        "knplabs/knp-paginator-bundle": "v2.3",
        "guzzle/guzzle": "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.3-dev"
        }
    }
}
Hyozo answered 21/3, 2013 at 7:11 Comment(1)
I suggest you change minimum stability to alpha and replace "dev-master" version to exact version with @dev posfix. So the knpmenubundle version will be "2.0.*@dev"Glabrous
W
3

You locked down some of your third-party bundles to a certain tag/version.

"friendsofsymfony/user-bundle": "v1.3.0",

The v1.3.0 tag of this bundle only supports Symfony 2.1.*.

You will have to go through every single third-party bundle and make sure you are using the right tag/version.

The line above should look like

"friendsofsymfony/user-bundle": "v1.3.1",

You can see the requirements of the v1.3.1 tag in the composer.json of the bundle.

You can also use the dev-master tag but that can cause issues if you don't plan on upgrading Symfony regularly.

Wootan answered 22/3, 2013 at 6:14 Comment(2)
Yes, you are right. Now I am facing the following error : "The service "jms_serializer.metadata_driver" has a dependency on a non-existent service "doctrine". In composer.json: "doctrine/doctrine-bundle": "1.2.*@alpha", "jms/serializer-bundle": "0.12.*"Hyozo
Did you try without @alpha? Are you sure Doctrine is included in AppKernel.php?Wootan
S
0

I have exactly the same problem. I changed the composer entry for doctrine bundle to

"doctrine/doctrine-bundle": "1.2.*@alpha",

because this is the reason why the overall stability flag is set to alpha according to: http://symfony.com/blog/symfony-2-2-0 .

But now I still have this message when updating the packages:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for doctrine/doctrine-bundle 1.2.*@alpha -> satisfiable by doctrine/doctrine-bundle v1.2.0-beta1.
    - Conclusion: don't install symfony/symfony 2.2.x-dev
    - Conclusion: don't install symfony/symfony v2.2.0
    - Conclusion: don't install symfony/symfony v2.2.0-RC3
    - Conclusion: don't install symfony/symfony v2.2.0-RC2
    - Installation request for bcc/resque-bundle v1.0 -> satisfiable by bcc/resque-bundle v1.0.
    - Conclusion: don't install symfony/symfony v2.2.0-RC1
    - Conclusion: don't install symfony/symfony v2.2.0-BETA2
    - doctrine/doctrine-bundle v1.2.0-beta1 requires symfony/framework-bundle >=2.2.0-beta2,<2.3-dev -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3, symfony/framework-bundle 2.2.x-dev, symfony/framework-bundle v2.2.0, symfony/framework-bundle v2.2.0-BETA2, symfony/framework-bundle v2.2.0-RC1, symfony/framework-bundle v2.2.0-RC2, symfony/framework-bundle v2.2.0-RC3.
    - don't install symfony/framework-bundle 2.2.x-dev|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/framework-bundle v2.2.0|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/framework-bundle v2.2.0-BETA2|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/framework-bundle v2.2.0-RC1|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/framework-bundle v2.2.0-RC2|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/framework-bundle v2.2.0-RC3|don't install symfony/symfony v2.2.0-BETA1
    - Installation request for symfony/symfony 2.2.* -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA1, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3.

I really don't get what the actual problem is out of this these error messages.

Simony answered 21/3, 2013 at 11:9 Comment(1)
I had update issues because of additional bundles. It is necessary to update them too. Now I'm having issuses with cache:clear "The service "jms_serializer.metadata_driver" has a dependency on a non-existent service "doctrine"."Hyozo

© 2022 - 2024 — McMap. All rights reserved.