1

我正在尝试使用KNP 博客中的建议将 Symfony 从 2.3 升级到 2.7,但作曲家给了我这个:

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: don't install symfony/symfony v2.7.1
    - don't install symfony/symfony v2.7.0|remove symfony/var-dumper v2.6.7
    - don't install symfony/var-dumper v2.6.7|don't install symfony/symfony v2.7.0
    - don't install symfony/symfony v2.7.0|don't install symfony/var-dumper v2.6.7
    - Installation request for symfony/symfony 2.7.* -> satisfiable by symfony/symfony[v2.7.0, v2.7.1].
    - Installation request for symfony/var-dumper == 2.6.7.0 -> satisfiable by symfony/var-dumper[v2.6.7].

我也尝试将我的 composer.json 更改为:

{
  "name": "symfony/framework-standard-edition",
  "license": "MIT",
  "type": "project",
  "autoload": {
    "psr-4": {
      "": "src/",
      "SymfonyStandard\\": "app/SymfonyStandard/"
    }
  },
  "require": {
    "php": ">=5.3.9",
    "symfony/symfony": "2.7.*",
    "doctrine/orm": "~2.2,>=2.2.3,<2.5",
    "doctrine/dbal": "<2.5",
    "doctrine/doctrine-bundle": "~1.4",
    "symfony/assetic-bundle": "~2.3",
    "symfony/swiftmailer-bundle": "~2.3",
    "symfony/monolog-bundle": "~2.4",
    "sensio/distribution-bundle": "~4.0",
    "sensio/framework-extra-bundle": "~3.0,>=3.0.2",
    "incenteev/composer-parameter-handler": "~2.0"
  },
  "require-dev": {
    "sensio/generator-bundle": "~2.3"
  },
  "scripts": {
    "post-root-package-install": [
      "SymfonyStandard\\Composer::hookRootPackageInstall"
    ],
    "post-install-cmd": [
      "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::removeSymfonyStandardFiles",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "post-update-cmd": [
      "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::removeSymfonyStandardFiles",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ]
  },
  "config": {
    "bin-dir": "bin"
  },
  "extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "symfony-assets-install": "relative",
    "incenteev-parameters": {
      "file": "app/config/parameters.yml"
    }
  }
}

这基本上是新安装的 symfony 2.7 composer.json 的副本,但“composer”返回相同的错误。

我没有发现有什么问题。谁能帮我?

提前致谢!!

4

1 回答 1

2

尝试使用相应的依赖项启动更新过程:

composer update symfony/symfony sensio/distribution-bundle --with-dependencies

您还可以尝试使用以下方法更新单个软件包:

composer update symfony/symfony twig/twig sensio/distribution-bundle
于 2015-08-20T06:47:53.023 回答