Trying to update symfony 3 to symfony 4:

composer update symfony/symfony 

I get the error:

  Problem 1 - Conclusion: remove symfony/symfony v3.3.14 - Conclusion: remove sensio/distribution-bundle v5.0.21 - Conclusion: don't install sensio/distribution-bundle v5.0.21 - Installation request for sensio/distribution-bundle == 5.0.21.0 -> satisfiable by sensio/distribution-bundle[v5.0.21]. - Conclusion: don't install symfony/symfony v4.0.1 - sensio/distribution-bundle v5.0.21 requires symfony/process ~2.3|~3.0 -> satisfiable by symfony/symfony[v3.3.14], symfony/process[v2.3.0, v2.3.1, v2.3.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24, v2. 

Since version 4 has become stable recently, please tell me how to resolve the conflict?

  • Written by SensioDistributionBundle WARNING: This bundle does not support Symfony 4. Symfony Flex is a total replacement for this bundle. Change it to Symfony Flex - Visman

2 answers 2

No The commentary described correctly that you need to switch to symfony-flex.

In the SensioDistributionBundle repository it is written:

WARNING: This bundle does not support symfony 4. Symfony Flex is a total replacement for this bundle.

Read more about symfony-flex

    You can switch to symfony 4 without using symfony flex. To do this, you must remove sensio / distribution-bundle from composer.json, then execute

     composer update 

    or

     composer update "symfony/*" --with-all-dependencies 

    if you do not need to update all other dependencies.

    If you swear at the locked version of a dependency, you can temporarily delete the composer.lock file

    After upgrading to symfony 4, you can optionally install symfony flex. In this case, it is possible to do it in reverse order, as you please, since Symfony flex is compatible with symfony 3.4

    And from the Symfony site: "Using Symfony Flex is optional, even in Symfony 4, where Flex is used by default" https://symfony.com/doc/current/setup/flex.html#upgrading-existing-applications- to-flex

    Those. Symfony Flex is recommended, but not required for Symfony 4.