2013-03-21 99 views
6

我想我的項目更新從symfony的2.1至2.2。我嘗試通過包來更新它。當我輸入composer.phar update symfony/symfony,我得到以下錯誤:Symfony的更新,從2.1到2.2的作曲家錯誤

Problem 1 
- Conclusion: don't install symfony/symfony 2.2.x-dev 
- Conclusion: don't install symfony/symfony v2.2.0 
- Conclusion: don't install symfony/symfony v2.2.0-RC3 
- Conclusion: don't install symfony/symfony v2.2.0-RC2 
- Installation request for symfony/monolog-bundle == 2.1.9999999.9999999-dev -> satisfiable by symfony/monolog-bundle 2.1.x-dev. 
- Conclusion: don't install symfony/symfony v2.2.0-RC1 
- Conclusion: don't install symfony/symfony v2.2.0-BETA2 
- doctrine/doctrine-bundle v1.2.0-beta1 requires symfony/framework-bundle >=2.2.0-beta2,<2.3-dev -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3, symfony/framework-bundle 2.2.x-dev, symfony/framework-bundle v2.2.0, symfony/framework-bundle v2.2.0-BETA2, symfony/framework-bundle v2.2.0-RC1, symfony/framework-bundle v2.2.0-RC2, symfony/framework-bundle v2.2.0-RC3. 
- doctrine/doctrine-bundle 1.2.x-dev requires symfony/framework-bundle >=2.2.0-beta2,<2.3-dev -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3, symfony/framework-bundle 2.2.x-dev, symfony/framework-bundle v2.2.0, symfony/framework-bundle v2.2.0-BETA2, symfony/framework-bundle v2.2.0-RC1, symfony/framework-bundle v2.2.0-RC2, symfony/framework-bundle v2.2.0-RC3. 
- don't install symfony/framework-bundle 2.2.x-dev|don't install symfony/symfony v2.2.0-BETA1 
- don't install symfony/framework-bundle v2.2.0|don't install symfony/symfony v2.2.0-BETA1 
- don't install symfony/framework-bundle v2.2.0-BETA2|don't install symfony/symfony v2.2.0-BETA1 
- don't install symfony/framework-bundle v2.2.0-RC1|don't install symfony/symfony v2.2.0-BETA1 
- don't install symfony/framework-bundle v2.2.0-RC2|don't install symfony/symfony v2.2.0-BETA1 
- don't install symfony/framework-bundle v2.2.0-RC3|don't install symfony/symfony v2.2.0-BETA1 
- Installation request for symfony/symfony 2.2.* -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA1, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3. 
- Installation request for doctrine/doctrine-bundle 1.2.* -> satisfiable by doctrine/doctrine-bundle 1.2.x-dev, doctrine/doctrine-bundle v1.2.0-beta1. 

我composer.json:

{ 
    "name": "symfony/framework-standard-edition", 
    "description": "The \"Symfony Standard Edition\" distribution", 
    "autoload": { 
     "psr-0": { "": "src/" } 
    }, 
    "require": { 
     "php": ">=5.3.3", 
     "symfony/symfony": "2.2.*", 
     "doctrine/orm": "~2.2,>=2.2.3", 
     "doctrine/doctrine-bundle": "1.2.*", 
     "twig/extensions": "1.0.*", 
     "symfony/assetic-bundle": "2.1.*", 
     "symfony/swiftmailer-bundle": "2.2.*", 
     "symfony/monolog-bundle": "2.2.*", 
     "sensio/distribution-bundle": "2.2.*", 
     "sensio/framework-extra-bundle": "2.2.*", 
     "sensio/generator-bundle": "2.2.*", 
     "jms/security-extra-bundle": "1.4.*", 
     "jms/di-extra-bundle": "1.3.*", 

     "friendsofsymfony/rest": "0.7.0", 
     "friendsofsymfony/rest-bundle": "0.9.0", 
     "jms/serializer-bundle": "0.9.0", 
     "friendsofsymfony/jsrouting-bundle": "1.0.3", 
     "friendsofsymfony/user-bundle": "v1.3.0", 
     "knplabs/knp-menu-bundle": "dev-master", 
     "knplabs/knp-paginator-bundle": "v2.3", 
     "guzzle/guzzle": "dev-master" 
    }, 
    "scripts": { 
     "post-install-cmd": [ 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 
     ], 
     "post-update-cmd": [ 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 
     ] 
    }, 
    "config": { 
     "bin-dir": "bin" 
    }, 
    "minimum-stability": "dev", 
    "extra": { 
     "symfony-app-dir": "app", 
     "symfony-web-dir": "web", 
     "branch-alias": { 
      "dev-master": "2.3-dev" 
     } 
    } 
} 
+0

我建議你換的最低穩定的α和替換「DEV-主」的版本與@dev posfix確切版本。所以knpmenubundle版本將是「2.0.*@dev」 – 2013-03-21 08:27:19

回答

0

我有完全一樣的問題。我改變了教條捆綁作曲家進入

"doctrine/doctrine-bundle": "1.2.*@alpha", 

,因爲這就是爲什麼整體穩定性標誌是根據設置爲阿爾法的原因:http://symfony.com/blog/symfony-2-2-0

但現在更新包時,我仍然有這樣的信息:

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

    Problem 1 
    - Installation request for doctrine/doctrine-bundle 1.2.*@alpha -> satisfiable by doctrine/doctrine-bundle v1.2.0-beta1. 
    - Conclusion: don't install symfony/symfony 2.2.x-dev 
    - Conclusion: don't install symfony/symfony v2.2.0 
    - Conclusion: don't install symfony/symfony v2.2.0-RC3 
    - Conclusion: don't install symfony/symfony v2.2.0-RC2 
    - Installation request for bcc/resque-bundle v1.0 -> satisfiable by bcc/resque-bundle v1.0. 
    - Conclusion: don't install symfony/symfony v2.2.0-RC1 
    - Conclusion: don't install symfony/symfony v2.2.0-BETA2 
    - doctrine/doctrine-bundle v1.2.0-beta1 requires symfony/framework-bundle >=2.2.0-beta2,<2.3-dev -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3, symfony/framework-bundle 2.2.x-dev, symfony/framework-bundle v2.2.0, symfony/framework-bundle v2.2.0-BETA2, symfony/framework-bundle v2.2.0-RC1, symfony/framework-bundle v2.2.0-RC2, symfony/framework-bundle v2.2.0-RC3. 
    - don't install symfony/framework-bundle 2.2.x-dev|don't install symfony/symfony v2.2.0-BETA1 
    - don't install symfony/framework-bundle v2.2.0|don't install symfony/symfony v2.2.0-BETA1 
    - don't install symfony/framework-bundle v2.2.0-BETA2|don't install symfony/symfony v2.2.0-BETA1 
    - don't install symfony/framework-bundle v2.2.0-RC1|don't install symfony/symfony v2.2.0-BETA1 
    - don't install symfony/framework-bundle v2.2.0-RC2|don't install symfony/symfony v2.2.0-BETA1 
    - don't install symfony/framework-bundle v2.2.0-RC3|don't install symfony/symfony v2.2.0-BETA1 
    - Installation request for symfony/symfony 2.2.* -> satisfiable by symfony/symfony 2.2.x-dev, symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA1, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3. 

我真的不明白實際的問題是什麼了這這些錯誤信息。

+0

我有更新問題,因爲附加捆綁。有必要更新它們。 現在我有issuses與緩存:「‘清 ’服務‘jms_serializer.metadata_driver’對一個不存在的服務的依賴」的信條 – Ris90 2013-03-21 11:48:44

3

你鎖定某些第三方捆,以一定的標籤/版本。

"friendsofsymfony/user-bundle": "v1.3.0", 

this bundle only supports Symfony 2.1.*v1.3.0標籤。

你必須要經過的每一個第三方包,並確保你使用了正確的標籤/版本。

上面的行應類似於

"friendsofsymfony/user-bundle": "v1.3.1", 

你可以看到在composer.json of the bundlev1.3.1標籤的要求。

您還可以使用dev-master標籤,但可能會導致問題,如果你沒有定期進行升級Symfony的計劃。

+0

是的,你說得對。現在我面臨着以下錯誤:jms_serializer.metadata_driver‘對一個不存在的服務依賴‘主義「服務’’。 在composer.json: ‘學說/教義束’:」 1.2.*@alpha 」 ‘JMS /串行束’:‘0.12 *’ – Ris90 2013-03-22 06:35:11

+0

你嘗試不使用'@ alpha'你肯定學說是包含在'AppKernel.php'? – 2013-03-22 15:16:26