我如何将Symfony2 2.8项目升级到3.0? 我在作曲家中将sf版本更改为3.0并启动了一个类似于article
的命令-sh-4.1$ composer update symfony/symfony 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
- sensio/generator-bundle v2.5.3 requires symfony/framework-bundle ~2.2 -> satisfiable by symfony/symfony[v2.8.0], symfony/framework-bundle[v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9, v2.3.0, v2.3.1, v2.3.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24, v2.3.25, v2.3.26, v2.3.27, v2.3.28, v2.3.29, v2.3.3, v2.3.30, v2.3.31, v2.3.32, v2.3.33, v2.3.34, v2.3.35, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8, v2.3.9, v2.4.0, v2.4.1, v2.4.10, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.8.0].
- sensio/generator-bundle v2.5.3 requires symfony/console ~2.5 -> satisfiable by symfony/symfony[v2.8.0], symfony/console[v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.8.0].
- sensio/generator-bundle v2.5.3 requires symfony/framework-bundle ~2.2 -> satisfiable by symfony/symfony[v2.8.0], symfony/framework-bundle[v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9, v2.3.0, v2.3.1, v2.3.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24, v2.3.25, v2.3.26, v2.3.27, v2.3.28, v2.3.29, v2.3.3, v2.3.30, v2.3.31, v2.3.32, v2.3.33, v2.3.34, v2.3.35, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8, v2.3.9, v2.4.0, v2.4.1, v2.4.10, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.8.0].
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.0
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.1
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.10
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.11
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.12
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.2
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.3
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.4
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.5
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.6
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.7
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.8
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.5.9
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.0
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.1
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.10
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.11
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.12
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.2
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.3
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.4
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.5
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.6
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.7
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.8
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.6.9
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.7.0
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.7.1
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.7.2
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.7.3
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.7.4
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.7.5
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.7.6
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.7.7
- don't install symfony/symfony v3.0.0|don't install symfony/console v2.8.0
- Can only install one of: symfony/symfony[v3.0.0, v2.8.0].
- don't install symfony/framework-bundle v2.2.0|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.1|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.10|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.11|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.2|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.3|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.4|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.5|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.6|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.7|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.8|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.2.9|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.0|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.1|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.10|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.11|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.12|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.13|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.14|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.15|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.16|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.17|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.18|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.19|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.2|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.20|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.21|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.22|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.23|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.24|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.25|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.26|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.27|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.28|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.29|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.3|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.30|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.31|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.32|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.33|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.34|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.35|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.4|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.5|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.6|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.7|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.8|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.3.9|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.0|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.1|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.10|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.2|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.3|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.4|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.5|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.6|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.7|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.8|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.4.9|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.0|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.1|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.10|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.11|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.12|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.2|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.3|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.4|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.5|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.6|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.7|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.8|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.5.9|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.0|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.1|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.10|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.11|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.12|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.2|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.3|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.4|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.5|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.6|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.7|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.8|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.6.9|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.7.0|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.7.1|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.7.2|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.7.3|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.7.4|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.7.5|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.7.6|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.7.7|don't install symfony/symfony v3.0.0
- don't install symfony/framework-bundle v2.8.0|don't install symfony/symfony v3.0.0
- Installation request for symfony/symfony 3.0.* -> satisfiable by symfony/symfony[v3.0.0].
- Installation request for sensio/generator-bundle == 2.5.3.0 -> satisfiable by sensio/generator-bundle[v2.5.3].
这是我的composer.json中的require块:
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"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.2",
"incenteev/composer-parameter-handler": "~2.0",
"white-october/pagerfanta-bundle": "^1.0"
},
答案 0 :(得分:6)
您的许多依赖项都不正确。你应该看一下:https://github.com/symfony/symfony-standard/blob/v3.0.0/composer.json
sensio/distribution-bundle
应该是版本~5.0
。
答案 1 :(得分:1)
我在http://manuel.kiessling.net/2015/12/07/upgrading-a-symfony-project-from-2-6-to-3-0/撰写了详尽的分步指南。
我接近升级的方式(从Symfony 2.6到3.0,在我的情况下)如下:
从头开始创建一个空的Symfony 3.0项目。之后它被丢弃了,但它对比较两个版本之间的变化非常有帮助。
更改项目结构。 Symfony 3.0引入了一个新的文件/目录结构,我已相应地移动了一些东西(我git将app/console
移到了{{ 1}},然后将bin/console
脚本从Symfony 3.0项目文件夹复制到实际项目中的bin/console
。然后,我将bin/console
移至app/SymfonyRequirements.php
,并移动{{} 1}}和var/SymfonyRequirements.php
到app/cache
。)
修复代码。此时,项目不再有效,接下来是更改代码的繁琐工作。您可以查看必须在this side-by-side diff中进行的所有更改。
答案 2 :(得分:0)
我认为你应该注意你的依赖性要求。这似乎是错误的版本。