douji0073
2019-03-10 16:57
浏览 161
已采纳

Symfony:您的要求无法解析为可安装的软件包集

today when I update my project with composer update I encountered this error

Problem 1

  • Conclusion: don't install symfony/symfony v3.4.23
  • 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
  • don't install symfony/twig-bundle v4.0.0|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.1|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.10|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.11|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.12|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.13|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.14|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.15|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.2|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.3|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.4|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.5|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.6|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.7|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.8|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.0.9|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.0|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.1|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.10|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.11|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.2|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.3|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.4|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.5|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.6|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.7|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.8|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.1.9|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.2.0|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.2.1|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.2.2|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.2.3|don't install symfony/symfony v3.4.0
  • don't install symfony/twig-bundle v4.2.4|don't install symfony/symfony v3.4.0
  • don't install symfony/symfony v3.4.0|remove symfony/twig-bundle v4.1.0

    • 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.23, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9].

    • Installation request for symfony/twig-bundle ^4.0 -> satisfiable by symfony/twig-bundle[v4.0.0, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.0, v4.2.1, v4.2.2, v4.2.3, v4.2.4].

composer.json

{
"name": "eolic",
"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": ">=5.5.9",
    "beberlei/doctrineextensions": "^1.0",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/orm": "^2.5",
    "friendsofsymfony/jsrouting-bundle": "^2.2",
    "friendsofsymfony/oauth-server-bundle": "dev-master",
    "friendsofsymfony/user-bundle": "~2.0",
    "incenteev/composer-parameter-handler": "^2.0",
    "sensio/distribution-bundle": "^5.0.19",
    "sensio/framework-extra-bundle": "^5.0.0",
    "symfony/apache-pack": "^1.0",
    "symfony/monolog-bundle": "^3.1.0",
    "symfony/polyfill-apcu": "^1.0",
    "symfony/swiftmailer-bundle": "^2.6.4",
    "symfony/symfony": "3.4.*",
    "symfony/templating": "^4.0",
    "symfony/twig-bundle": "^4.0",
    "twig/twig": "~1.34|~2.4"
},
"require-dev": {
    "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
}

Thanks a lot

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • drfcaw7460 2019-03-10 17:42
    已采纳

    The versions you have specified are incompatible with each other. In this case, it's symfony/symfony version 3.4, together with symfony/twig and symfony/templating with 4.0. That can't possibly work. Is your project symfony 4 ready? Then either use symfony/symfony ^4.0, or symfony/flex ^1.2 (if your project structure is symfony-flex ready). If your project has deprecations in Symfony 3, use the ^3.4 version constraint for twig and templating.

    Edit: I also think that Symfony 4 requires php >= 7, so you might have to update that as well, if you want to go with Symfony 4.

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题