symfony从2.3升级到2.7

时间:2015-06-13 16:10:14

标签: symfony composer-php upgrade symfony-2.3 symfony-2.7

我尝试使用would match a中的recomendations将Symfony从2.3升级到2.7,但作曲家给了我这个:

{
  "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"
    }
  }
}

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

instance

这基本上是一个新鲜的instalation symfony 2.7 composer.json的副本,但&#34; composer&#34;返回相同的错误。

我没有发现什么是错的。任何人都可以帮助我吗?

提前致谢!!

1 个答案:

答案 0 :(得分:2)

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

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

您还可以尝试使用以下内容更新单个包:

composer update symfony/symfony twig/twig sensio/distribution-bundle