简体   繁体   中英

symfony/symfony replaces symfony/process and thus cannot coexist with it

Trying to upgrade from symfony 3.4 to 4.4

I've changed this lines on composer.json

"symfony/symfony": "^4.4", "doctrine/orm": "^2.8",

and this is the complete composer.json

{
  "name": "...",
  "license": "proprietary",
  "type": "project",
  "autoload": {
    "psr-4": {
      "AppBundle\\": "src/AppBundle"
    },
    "classmap": [
      "app/AppKernel.php",
      "app/AppCache.php"
    ]
  },
  "autoload-dev": {
    "psr-4": {
      "Tests\\": "tests/"
    },
    "files": [
      "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
    ]
  },
  "require": {
    "php": ">=7.2",
    "beberlei/doctrineextensions": "^1.2",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/orm": "^2.8",
    "endroid/qr-code-bundle": "^3.4",
    "friendsofsymfony/jsrouting-bundle": "^2.2",
    "friendsofsymfony/user-bundle": "^2.1",
    "gedmo/doctrine-extensions": "^2.4",
    "incenteev/composer-parameter-handler": "^2.0",
    "knplabs/knp-snappy-bundle": "^1.6",
    "lexik/translation-bundle": "^4.0",
    "nelmio/security-bundle": "^2.10",
    "picqer/php-barcode-generator": "^0.2.2",
    "sensio/distribution-bundle": "^5.0.19",
    "sensio/framework-extra-bundle": "^6.2.4",
    "sentry/sentry-symfony": "^3.4",
    "symfony/monolog-bundle": "^3.1.0",
    "symfony/polyfill-apcu": "^1.0",
    "symfony/swiftmailer-bundle": "^2.6.4",
    "symfony/symfony": "^4.4",
    "twig/twig": "^1.0||^2.0",
    "ext-json": "*",
    "setasign/fpdf": "^1.8",
    "setasign/fpdi-protection": "^2.0"
  },
  "require-dev": {
    "doctrine/doctrine-fixtures-bundle": "^3.0",
    "sensio/generator-bundle": "^3.0",
    "symfony/phpunit-bridge": "^3.0"
  },
  "scripts": {
    "symfony-scripts": [
      "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-install-cmd": [
      "@symfony-scripts"
    ],
    "post-update-cmd": [
      "@symfony-scripts"
    ]
  },
  "config": {
    "sort-packages": true
  },
  "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": null
  }
}

when I execute composer update

I get this error message

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

  Problem 1
    - Conclusion: don't install sensio/distribution-bundle v5.0.20 (conflict analysis result)
    - Conclusion: don't install sensio/distribution-bundle v5.0.21 (conflict analysis result)
    - Conclusion: don't install sensio/distribution-bundle v5.0.22 (conflict analysis result)
    - Conclusion: don't install sensio/distribution-bundle v5.0.23 (conflict analysis result)
    - Conclusion: don't install sensio/distribution-bundle v5.0.24 (conflict analysis result)
    - Conclusion: don't install sensio/distribution-bundle v5.0.25 (conflict analysis result)
    - Root composer.json requires sensio/distribution-bundle ^5.0.19 -> satisfiable by sensio/distribution-bundle[v5.0.19, ..., v5.0.25].
    - Conclusion: don't install symfony/symfony v4.4.2 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.3 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.4 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.5 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.6 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.7 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.8 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.9 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.10 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.11 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.12 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.13 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.14 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.15 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.16 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.17 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.18 (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.19 (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.36], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.35], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.34], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.33], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.32], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.31], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.30], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.29], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.28], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.27], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.26], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.25], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.24], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.23], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.22], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.21], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install one of symfony/symfony[v4.4.20], sensio/distribution-bundle[v5.0.19] (conflict analysis result)
    - Conclusion: don't install symfony/symfony v4.4.1 (conflict analysis result)
    - sensio/distribution-bundle v5.0.19 requires symfony/process ~2.3|~3.0 -> satisfiable by symfony/process[v2.3.0, ..., v2.8.52, v3.0.0, ..., v3.4.47].
    - Only one of these can be installed: symfony/process[v2.3.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.36, v5.0.0, ..., v5.4.2], symfony/symfony[v4.4.0, ..., v4.4.36]. symfony/symfony replaces symfony/process and thus cannot coexist with it.
    - Root composer.json requires symfony/symfony ^4.4 -> satisfiable by symfony/symfony[v4.4.0, ..., v4.4.36].

Not sure how to fix it

symfony/symfony is the core package for all parts of Symfony. All. It would be better to require only the parts that you need, to be able to update dependencies step by step.

The current problem is:

- sensio/distribution-bundle v5.0.19 requires symfony/process ~2.3|~3.0 -> satisfiable by symfony/process[v2.3.0, ..., v2.8.52, v3.0.0, ..., v3.4.47].
- Only one of these can be installed: symfony/process[v2.3.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.36, v5.0.0, ..., v5.4.2], symfony/symfony[v4.4.0, ..., v4.4.36]. symfony/symfony replaces symfony/process and thus cannot coexist with it.
- Root composer.json requires symfony/symfony ^4.4 -> satisfiable by symfony/symfony[v4.4.0, ..., v4.4.36].

As sensio/distribution-bundle is abandoned and imcompatible with Symfony 4, it should be removed from your project before updating to Symfony 4.4.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM