0

I am having troubles upgrading my Symfony project from 4.4. to 5.0. I already removed all depreciations and so forth and am now trying to upgrade via composer.

When I run composer update "symfony/*" I get the following error:

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

  Problem 1
    - Conclusion: remove stof/doctrine-extensions-bundle v1.6.0
    - Conclusion: don't install stof/doctrine-extensions-bundle v1.6.0
    - Conclusion: don't install symfony/console v5.0.11
    - Conclusion: don't install symfony/console v5.0.10
    - Conclusion: don't install symfony/console v5.0.9
    - Conclusion: don't install symfony/console v5.0.8
    - Conclusion: don't install symfony/console v5.0.7
    - Conclusion: don't install symfony/console v5.0.6
    - Conclusion: don't install symfony/console v5.0.5
    - Conclusion: don't install symfony/console v5.0.4
    - Conclusion: don't install symfony/console v5.0.3
    - Conclusion: don't install symfony/console v5.0.2
    - Installation request for stof/doctrine-extensions-bundle (locked at v1.6.0, required as ^1.3) -> satisfiable by stof/doctrine-extensions-bundle[v1.6.0].
    - Conclusion: don't install symfony/console v5.0.1
    - stof/doctrine-extensions-bundle v1.6.0 requires symfony/http-kernel ^4.4 || ^5.2 -> satisfiable by symfony/http-kernel[v4.4.21].
    - symfony/console v5.0.0 conflicts with symfony/http-kernel[v4.4.21].
    - symfony/console v5.0.0 conflicts with symfony/http-kernel[v4.4.21].
    - Installation request for symfony/console 5.0.* -> satisfiable by symfony/console[v5.0.0, v5.0.1, v5.0.10, v5.0.11, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9].

It looks like there is a problem with symfony/console and symfony/http-kernel. When I checked stof/doctrine-extensions-bundle on packagist I coudn't find any restrictions on symfony/console. For symfony/http-kernel it looks like at least 5.2 is required, however, I don't want to upgrade directly to Symfony 5.2, or is that the only way I can solve this? Does anyone see / know where this problem is coming from and can point me in the right direction?

Here is my composer.json:

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-curl": "*",
        "ext-iconv": "*",
        "ext-intl": "*",
        "ext-json": "*",
        "ext-openssl": "*",
        "ext-zlib": "*",
        "babdev/pagerfanta-bundle": "^2.10",
        "dompdf/dompdf": "^0.8.3",
        "endroid/qrcode-bundle": "^3.4",
        "friendsofsymfony/ckeditor-bundle": "^2.1",
        "league/csv": "^8.0",
        "mobiledetect/mobiledetectlib": "^2.8",
        "sensio/framework-extra-bundle": "^5.4",
        "stof/doctrine-extensions-bundle": "^1.3",
        "swiftmailer/swiftmailer": "^6.0",
        "symfony/apache-pack": "^1.0",
        "symfony/asset": "5.0.*",
        "symfony/console": "5.0.*",
        "symfony/dotenv": "5.0.*",
        "symfony/flex": "^1.3.1",
        "symfony/form": "5.0.*",
        "symfony/framework-bundle": "5.0.*",
        "symfony/intl": "5.0.*",
        "symfony/maker-bundle": "^1.13",
        "symfony/monolog-bundle": "^3.5",
        "symfony/orm-pack": "^1.0",
        "symfony/security-bundle": "5.0.*",
        "symfony/serializer": "5.0.*",
        "symfony/serializer-pack": "^1.0",
        "symfony/swiftmailer-bundle": "^3.4",
        "symfony/twig-bundle": "5.0.*",
        "symfony/yaml": "5.0.*"
    },
    "require-dev": {
        "doctrine/doctrine-fixtures-bundle": "^3.2",
        "symfony/phpunit-bridge": "^5.2",
        "symfony/profiler-pack": "^1.0"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "5.0.*"
        }
    }
}


yivi
  • 42,438
  • 18
  • 116
  • 138
christophr
  • 21
  • 4

1 Answers1

0

stof/doctrine-extensions-bundle v1.6.0 requires symfony/http-kernel ^4.4 || ^5.2 looks pretty clear to me: that package in that given version is not compatible with Symfony 5.0

Either downgrade stof/doctrine-extensions-bundle to v1.5 (which is compatible with Symfony 5.0), or (the better solution) update Symfony to v5.2 - the Support for 5.0 has ended in July 2020

Nico Haase
  • 11,420
  • 35
  • 43
  • 69