Composer update with "doctrine/doctrine-bundle": "2.0.*" conflicts

Viewed 35

I am trying to upgrade a version of doctrine-bundle that is currently quite old, to be able to ultimately upgrade Symfony to 4.4.

I am currently getting these

Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested.
Package doctrine/mongodb is abandoned, you should avoid using it. No replacement was suggested.
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.

this is a part of my composer.json:

"require": {
    "php": "^7.1",
    "symfony/symfony": "3.4.*",
    "doctrine/orm": "2.*",
    "doctrine/doctrine-bundle": "1.*",
...

When I would like to install a higher version of doctrine (i.e. 2.*) I get the following:

Problem 1
- symfony/cache[v5.0.0, ..., v5.0.8] require php ^7.2.5 -> your php version (7.1.33) does not satisfy that requirement.
- symfony/cache[v5.0.9, ..., v5.4.11] require php >=7.2.5 -> your php version (7.1.33) does not satisfy that requirement.
- Root composer.json requires symfony/symfony 3.4.49 -> satisfiable by symfony/symfony[v3.4.49].
- doctrine/doctrine-bundle 2.0.10 requires symfony/cache ^4.3.3|^5.0 -> satisfiable by symfony/cache[v4.3.3, ..., v4.4.44, v5.0.0, ..., v5.4.11].
- Only one of these can be installed: symfony/cache[v3.1.0, ..., v3.4.47, v4.0.0, ..., v4.4.44, v5.0.0, ..., v5.4.11, v6.0.0, ..., v6.1.3], symfony/symfony[v3.4.49]. symfony/symfony replaces symfony/cache and thus cannot coexist with it.
- Root composer.json requires doctrine/doctrine-bundle 2.0.10 -> satisfiable by doctrine/doctrine-bundle[2.0.10].

So it's a little bit unclear for me why the following happen:

  1. Why is it complaining about symfony/cache 5.* when according to packagist it can just install the ^4.3.3 version
  2. Why is it trying to install symfony/cache in the first place, if my composer json contains symfony/symfony which apparently replaces it?

Can you help me to figure out how to upgrade doctrine-bundle? Also, when it says "Problem 1", which one of these is actually the problem?

Thank you!

0 Answers
Related