【问题标题】:symfony/dependency-injection conflict with symfony/consolesymfony/依赖注入与 symfony/console 冲突
【发布时间】:2018-12-05 15:43:22
【问题描述】:

我有一个尝试更新的 magento2.2.6 网站。现在我遇到了这个错误:

symfony/dependency-injection v3.3.0 与 symfony/console[v4.1.5] 冲突。

我尝试查看了几个论坛和问题,也更改了一些版本,但没有好的结果。冲突问题仍然存在,我没有办法了。

.{    Problem 

  - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
  - magento/framework 102.0.0 requires symfony/console ~4.1.0 -> satisfiable by symfony/console[v4.1.0, v4.1.1, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8].
  - symfony/dependency-injection v3.3.0 conflicts with symfony/console[v4.1.0].
  - symfony/dependency-injection v3.3.0 conflicts with symfony/console[v4.1.1].
  - symfony/dependency-injection v3.3.0 conflicts with symfony/console[v4.1.2].
  - symfony/dependency-injection v3.3.0 conflicts with symfony/console[v4.1.3].
  - symfony/dependency-injection v3.3.0 conflicts with symfony/console[v4.1.4].
  - symfony/dependency-injection v3.3.0 conflicts with symfony/console[v4.1.5].
  - symfony/dependency-injection v3.3.0 conflicts with symfony/console[v4.1.6].
  - symfony/dependency-injection v3.3.0 conflicts with symfony/console[v4.1.7].
  - symfony/dependency-injection v3.3.0 conflicts with symfony/console[v4.1.8].
  - magento/product-community-edition 2.3.0 requires magento/framework 102.0.0 -> satisfiable by magento/framework[102.0.0].
  - Installation request for symfony/dependency-injection 3.3.0 -> satisfiable by symfony/dependency-injection[v3.3.0]

}

任何想法

【问题讨论】:

  • 您是否遵循供应商的升级安装说明?

标签: symfony


【解决方案1】:

要首先解决上述问题,您必须运行以下命令

第 1 步

composer config preferred-install dist
composer config sort-packages true
composer config prefer-stable true

第 2 步

composer require --dev friendsofphp/php-cs-fixer:~2.10.0 --no-update

第 3 步

composer require --dev friendsofphp/php-cs-fixer:~2.10.0 --no-update

第 4 步

php -r '$autoload=json_decode(file_get_contents("composer.json"), true); $autoload["autoload"]["psr-4"]["Zend\\Mvc\\Controller\\"]= "setup/src/Zend/Mvc/Controller/"; file_put_contents("composer.json", json_encode($autoload, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES));'

第 5 步

composer require magento/product-community-edition 2.3.0 --no-update

第 6 步

composer update

第 7 步

php bin/magento setup:upgrade

【讨论】:

    【解决方案2】:

    每一步我都做了,结果是这样的:

    作曲家更新后

    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
    - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
    - magento/product-community-edition 2.3.0 requires magento/magento2-base 2.3.0 -> satisfiable by magento/magento2-base[2.3.0].
    - Conclusion: remove symfony/dependency-injection v3.3.0
    - magento/magento2-base 2.3.0 requires symfony/event-dispatcher ~4.1.0 -> satisfiable by symfony/event-dispatcher[v4.1.0, v4.1.1, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.0].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.1].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.2].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.3].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.4].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.5].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.6].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.7].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.8].
    - symfony/dependency-injection v3.3.0 conflicts with symfony/event-dispatcher[v4.1.9].
    - Installation request for symfony/dependency-injection 3.3.0 -> satisfiable by symfony/dependency-injection[v3.3.0].
    

    【讨论】:

      猜你喜欢
      • 2018-04-06
      • 2019-01-05
      • 2014-09-23
      • 1970-01-01
      • 2018-03-02
      • 2012-07-13
      • 2017-01-23
      • 1970-01-01
      • 2018-10-24
      相关资源
      最近更新 更多