3

So I have this blog developped with Symfony 2.8.6. I noticed that Symfony3.1 LTS version is available and wish to upgrade. I therefore fixed all the deprecation calls.

I grabbed Symfony3.1's composer.json file and tried to run

$ composer update

However, update fails and I get the following output:

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
    - phpunit/phpunit 5.3.4 requires phpspec/prophecy ^1.3.1 -> satisfiable by phpspec/prophecy[v1.6.0, 1.4.0, v1.3.1, v1.4.1, v1.5.0].
    - phpunit/phpunit 5.3.0 requires phpspec/prophecy ^1.3.1 -> satisfiable by phpspec/prophecy[v1.6.0, 1.4.0, v1.3.1, v1.4.1, v1.5.0].
    - phpunit/phpunit 5.3.1 requires phpspec/prophecy ^1.3.1 -> satisfiable by phpspec/prophecy[v1.6.0, 1.4.0, v1.3.1, v1.4.1, v1.5.0].
    - phpunit/phpunit 5.3.2 requires phpspec/prophecy ^1.3.1 -> satisfiable by phpspec/prophecy[v1.6.0, 1.4.0, v1.3.1, v1.4.1, v1.5.0].
    - phpunit/phpunit 5.3.3 requires phpspec/prophecy ^1.3.1 -> satisfiable by phpspec/prophecy[v1.6.0, 1.4.0, v1.3.1, v1.4.1, v1.5.0].
    - phpunit/phpunit 5.3.4 requires phpspec/prophecy ^1.3.1 -> satisfiable by phpspec/prophecy[v1.6.0, 1.4.0, v1.3.1, v1.4.1, v1.5.0].
    - phpspec/prophecy v1.6.0 requires phpdocumentor/reflection-docblock ~2.0 -> satisfiable by phpdocumentor/reflection-docblock[2.0.4, 2.0.0, 2.0.1, 2.0.2, 2.0.3].
    - phpspec/prophecy 1.4.0 requires phpdocumentor/reflection-docblock ~2.0 -> satisfiable by phpdocumentor/reflection-docblock[2.0.4, 2.0.0, 2.0.1, 2.0.2, 2.0.3].
    - phpspec/prophecy v1.3.1 requires phpdocumentor/reflection-docblock ~2.0 -> satisfiable by phpdocumentor/reflection-docblock[2.0.4, 2.0.0, 2.0.1, 2.0.2, 2.0.3].
    - phpspec/prophecy v1.4.1 requires phpdocumentor/reflection-docblock ~2.0 -> satisfiable by phpdocumentor/reflection-docblock[2.0.4, 2.0.0, 2.0.1, 2.0.2, 2.0.3].
    - phpspec/prophecy v1.5.0 requires phpdocumentor/reflection-docblock ~2.0 -> satisfiable by phpdocumentor/reflection-docblock[2.0.4, 2.0.0, 2.0.1, 2.0.2, 2.0.3].
    - phpspec/prophecy v1.6.0 requires phpdocumentor/reflection-docblock ~2.0 -> satisfiable by phpdocumentor/reflection-docblock[2.0.4, 2.0.0, 2.0.1, 2.0.2, 2.0.3].
    - phpdocumentor/reflection-docblock 2.0.0 conflicts with symfony/symfony[v3.1.0].
    - phpdocumentor/reflection-docblock 2.0.1 conflicts with symfony/symfony[v3.1.0].
    - phpdocumentor/reflection-docblock 2.0.2 conflicts with symfony/symfony[v3.1.0].
    - phpdocumentor/reflection-docblock 2.0.3 conflicts with symfony/symfony[v3.1.0].
    - phpdocumentor/reflection-docblock 2.0.4 conflicts with symfony/symfony[v3.1.0].
    - symfony/symfony v3.1.0 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - Installation request for symfony/symfony 3.1.* -> satisfiable by symfony/symfony[v3.1.0].
    - Installation request for phpunit/phpunit 5.3.* -> satisfiable by phpunit/phpunit[5.3.0, 5.3.1, 5.3.2, 5.3.3, 5.3.4].

Here is my composer.json:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-4": { "": "src/" },
        "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
    },
    "autoload-dev": {
        "psr-4": { "Tests\\": "tests/" }
    },
    "require": {
        "php": ">=5.5.9",
        "symfony/symfony": "3.1.*",
        "doctrine/orm": "^2.5",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/doctrine-cache-bundle": "^1.2",
        "symfony/swiftmailer-bundle": "^2.3",
        "symfony/monolog-bundle": "^2.8",
        "symfony/polyfill-apcu": "^1.0",
        "sensio/distribution-bundle": "^5.0",
        "sensio/framework-extra-bundle": "^3.0.2",
        "incenteev/composer-parameter-handler": "^2.0",
        "symfony/assetic-bundle": "^2.7",
        "knplabs/knp-time-bundle": "^1.6",
        "eko/feedbundle": "^1.2",
        "friendsofsymfony/user-bundle": "dev-master",
        "lexik/maintenance-bundle": "dev-master",
        "phpunit/phpunit": "5.3.*"
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0",
        "symfony/phpunit-bridge": "^3.0"
    },
    "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",
            "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::prepareDeploymentTarget"
        ]
    },
    "config": {
        "bin-dir": "bin",
        "platform": {
            "php": "5.6.16"
        }
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "3.1-dev"
        }
    }
}

I also tried adding the --with-dependencies option when running composer update but to no avail.

Does anyone know which package is conflicting?

Community
  • 1
  • 1
D4V1D
  • 5,805
  • 3
  • 30
  • 65
  • Just wanted to point out that 3.1 is NOT a Long Term Release. There will be releases every six months. The next LTS will be 3.4 due out in Nov 2017. http://symfony.com/roadmap?version=3.4#checker By all means upgrade but make sure you are upgrading for the right reasons. – Cerad May 31 '16 at 13:10
  • @Cerad: Oh my gosh you are so right! Do you think I should stick to the 2.8 then? – D4V1D May 31 '16 at 13:12
  • That of course is entirely up to you and your apps. – Cerad May 31 '16 at 13:19
  • @Cerad: You're right. I think I'll go with 3.0 and update as soon as next releases become available up to the 3.4 (LTS). Thanks to you! – D4V1D May 31 '16 at 13:21

1 Answers1

1

This is due to a conflict between Symfony 3.1 and phpdocumentor/reflection-docblock: <3.0 (which is required by PHPUnit), this is declared in the composer.json file:

"conflict": {
    "phpdocumentor/reflection-docblock": "<3.0"
},

Source: https://github.com/symfony/symfony/blob/b004243cb31059f9a97c0a1a045c2dbd1a77dee8/composer.json#L92

You have several solutions:

A.L
  • 10,259
  • 10
  • 67
  • 98
  • Yes! I just saw that! I therefore upgraded to 3.0 waiting for the conflict to be resolved. Thanks! – D4V1D May 31 '16 at 12:43