-1

I'm searching about this error on Stack Overflow but I don't find anything about it.

Recently I updated Symfony 2.8 to 3.4.22 and now I have to update some bundles with composer, 3 of 21 bundles have problems when I try to upgrade them.

These bundles are: - symfony/doctrine-bridge - friendsofsymfony/user-bundle - friendsofsymfony/oauth-server-bundle

The output of composer when I try to install these bundles manually is:

Using version ^4.2 for symfony/doctrine-bridge
./composer.json has been updated
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
    - Conclusion: remove doctrine/doctrine-bundle 1.10.2
    - Conclusion: don't install doctrine/doctrine-bundle 1.10.2
    - Conclusion: remove symfony/symfony v3.4.22
    - Conclusion: don't install symfony/symfony v3.4.22
    - Conclusion: don't install symfony/symfony v3.4.21
    - Conclusion: don't install symfony/symfony v3.4.20
    - Conclusion: don't install symfony/symfony v3.4.19
    - Conclusion: don't install symfony/symfony v3.4.18
    - Conclusion: don't install symfony/symfony v3.4.17
    - Conclusion: don't install symfony/symfony v3.4.16
    - Conclusion: don't install symfony/symfony v3.4.15
    - Conclusion: don't install symfony/symfony v3.4.14
    - Conclusion: don't install symfony/symfony v3.4.13
    - Conclusion: don't install symfony/symfony v3.4.12
    - Conclusion: don't install symfony/symfony v3.4.11
    - Conclusion: don't install symfony/symfony v3.4.10
    - Conclusion: don't install symfony/symfony v3.4.9
    - Conclusion: don't install symfony/symfony v3.4.8
    - Conclusion: don't install symfony/symfony v3.4.7
    - Conclusion: don't install symfony/symfony v3.4.6
    - Conclusion: don't install symfony/symfony v3.4.5
    - Conclusion: don't install symfony/symfony v3.4.4
    - Conclusion: don't install symfony/symfony v3.4.3
    - Conclusion: don't install symfony/symfony v3.4.2
    - Conclusion: don't install symfony/symfony v3.4.1
    - Installation request for doctrine/doctrine-bundle (locked at 1.10.2, required as ^1.6) -> satisfiable by doctrine/doctrine-bundle[1.10.2].
    - Conclusion: don't install symfony/symfony v3.4.0
    - doctrine/doctrine-bundle 1.10.2 requires symfony/doctrine-bridge ~2.7|~3.0|~4.0 -> satisfiable by symfony/doctrine-bridge[v4.2.0, v4.2.1, v4.2.2, v4.2.3].
    - don't install symfony/doctrine-bridge v4.2.0|don't install symfony/symfony v3.4.22
    - don't install symfony/doctrine-bridge v4.2.1|don't install symfony/symfony v3.4.22
    - don't install symfony/doctrine-bridge v4.2.2|don't install symfony/symfony v3.4.22
    - don't install symfony/doctrine-bridge v4.2.3|don't install symfony/symfony v3.4.22
    - Installation request for symfony/symfony 3.4.* -> satisfiable by symfony/symfony[v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9].


Installation failed, reverting ./composer.json to its original content.

And the friendsofsymfony/oauth-server-bundle and friendsofsymfony/user-bundle are the same errors:

Using version ^1.6 for friendsofsymfony/oauth-server-bundle
./composer.json has been updated
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
    - friendsofsymfony/oauth-server-bundle 1.6.2 requires paragonie/random_compat ^1|^2 -> satisfiable by paragonie/random_compat[1.0.10, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, v1.0.0, v1.0.1, v1.2.0, v1.2.1, v1.2.2, v1.2.3, v1.3.0, v1.3.1, v1.4.0, v1.4.1, v1.4.2, v1.4.3, v1.x-dev, v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9] but these conflict with your requirements or minimum-stability.
    - friendsofsymfony/oauth-server-bundle 1.6.1 requires paragonie/random_compat ^1|^2 -> satisfiable by paragonie/random_compat[1.0.10, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, v1.0.0, v1.0.1, v1.2.0, v1.2.1, v1.2.2, v1.2.3, v1.3.0, v1.3.1, v1.4.0, v1.4.1, v1.4.2, v1.4.3, v1.x-dev, v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9] but these conflict with your requirements or minimum-stability.
    - friendsofsymfony/oauth-server-bundle 1.6.0 requires paragonie/random_compat ^1|^2 -> satisfiable by paragonie/random_compat[1.0.10, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, v1.0.0, v1.0.1, v1.2.0, v1.2.1, v1.2.2, v1.2.3, v1.3.0, v1.3.1, v1.4.0, v1.4.1, v1.4.2, v1.4.3, v1.x-dev, v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9] but these conflict with your requirements or minimum-stability.
    - Installation request for friendsofsymfony/oauth-server-bundle ^1.6 -> satisfiable by friendsofsymfony/oauth-server-bundle[1.6.0, 1.6.1, 1.6.2].


Installation failed, reverting ./composer.json to its original content.

How I can resolve these dependencies?

Any help is welcome

  • Edit 1: I'm trying to do a fresh bundles install not updating the older bundles
  • Edit 2: PHP Version => 7.1.26
D. Duran
  • 35
  • 8
  • The reason there are so many of the question out there is that there is no single magic bullet. It all depends. Personally, I would create a fresh project 3.4 project and then require each of the additional third party bundles. Hopefully they all have a version which supports 3.4. That at least gives me a starting point. In theory you could then replace your existing composer.json file with the new one, delete the vendor directory, install and cross your fingers. – Cerad Feb 21 '19 at 12:20
  • @Cerad that's precisely what I am doing – D. Duran Feb 21 '19 at 12:31
  • Possible duplicate of [Error when running composer install command](https://stackoverflow.com/questions/54763460/error-when-running-composer-install-command) – Fabian Schmick Feb 21 '19 at 12:39
  • @Fabian I currently updated to Symfony 3.4, the question is different because I'm trying to do a fresh bundles installation – D. Duran Feb 21 '19 at 12:44
  • php version? Make sure your console version of php is at least 5.6. Assuming you started with "composer create-project symfony/framework-standard-edition ." then the doctrine bridge is automatically installed so there you be no need to update it. I just created a fresh 3.4 and installed the fos bundles with no problem. I happen to be using php 7.3. – Cerad Feb 21 '19 at 12:45
  • @Cerad I didn't start new project, I only removed all bundles, copied composer.json (from an empty project) and I did a composer install. All worked well less when I tries to install some third-party bundles. My PHP version is 7.1.26 – D. Duran Feb 21 '19 at 12:52
  • And this is why these questions are so difficult to provide help for. At this point, I don't have a clue as to what you asking. Good luck. – Cerad Feb 21 '19 at 13:02
  • How are you upgrading them? Have you tried the options `--update-with-dependencies` or `--update-with-all-dependencies` to ensure dependencies are updated as well? See: https://getcomposer.org/doc/03-cli.md#require – dbrumann Feb 21 '19 at 13:42
  • @dbrumann yes, but the problem is when I try to install them when I previously install other bundles. I can't update them without cleaning old bundles. – D. Duran Feb 21 '19 at 13:53

1 Answers1

1

Here is the solution:

In composer.json, change:

"paragonie/random_compat": "^2.1",

By this (if you don't have it, add it):

"paragonie/random_compat": ">=1",

And remove in the same document this line:

"symfony/doctrine-bridge" : "~2.1",

Then, make a composer update and for me, it works like a charm!

References:

Thank you all

D. Duran
  • 35
  • 8