Symfony 更新 2.8 到 3.4 [英] Symfony Update 2.8 to 3.4

查看:44
本文介绍了Symfony 更新 2.8 到 3.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的旧 Symfony 项目从 2.8 升级到 4.0,但我从 2.8 升级到 3.4.我使用本教程来升级转向Symfony 3.4.

I wanted to upgrade my old Symfony project from 2.8 to 4.0 but I stacked at upgrade from 2.8 to 3.4. I used this tutorial for the upgrade Moving to Symfony 3.4.

我在尝试通过 Composer 进行更新时遇到一些错误 Composer 升级错误:

I got some errors while trying to update through composer Composer Upgrade Errors:

# php composer.phar update symfony/symfony --with-dependencies
Dependency "symfony/polyfill-apcu" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "twig/twig" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "ircmaxell/password-compat" is also a root requirement, but is not explicitly whitelisted. Ignoring.
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
    - The requested package symfony/monolog-bundle (installed at v2.12.1, required as ^3.1.0) is satisfiable by symfony/monolog-bundle[v2.12.1] but these conflict with your requirements or minimum-stability.
  Problem 2
    - The requested package sensio/distribution-bundle (installed at v3.0.36, required as ^5.0.19) is satisfiable by sensio/distribution-bundle[v3.0.36] but these conflict with your requirements or minimum-stability.
  Problem 3
    - The requested package sensio/framework-extra-bundle (installed at v3.0.29, required as ^5.0.0) is satisfiable by sensio/framework-extra-bundle[v3.0.29] but these conflict with your requirements or minimum-stability.
  Problem 4
    - The requested package sensio/generator-bundle (installed at v2.5.3, required as ^3.0) is satisfiable by sensio/generator-bundle[v2.5.3] but these conflict with your requirements or minimum-stability.
  Problem 5
    - 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
    - Conclusion: don't install symfony/symfony v3.4.0
    - Conclusion: don't install symfony/symfony v3.3.16
    - Conclusion: don't install symfony/symfony v3.3.15
    - Conclusion: don't install symfony/symfony v3.3.14
    - Conclusion: don't install symfony/symfony v3.3.13
    - Conclusion: don't install symfony/symfony v3.3.12
    - Conclusion: don't install symfony/symfony v3.3.11
    - Conclusion: don't install symfony/symfony v3.3.10
    - Conclusion: don't install symfony/symfony v3.3.9
    - Conclusion: don't install symfony/symfony v3.3.8
    - Conclusion: don't install symfony/symfony v3.3.7
    - Conclusion: don't install symfony/symfony v3.3.6
    - Conclusion: don't install symfony/symfony v3.3.5
    - Conclusion: don't install symfony/symfony v3.3.4
    - Conclusion: don't install symfony/symfony v3.3.3
    - Conclusion: don't install symfony/symfony v3.3.2
    - Conclusion: don't install symfony/symfony v3.3.1
    - Conclusion: don't install symfony/symfony v3.3.0
    - Conclusion: don't install symfony/symfony v3.2.14
    - Conclusion: don't install symfony/symfony v3.2.13
    - Conclusion: don't install symfony/symfony v3.2.12
    - Conclusion: don't install symfony/symfony v3.2.11
    - Conclusion: don't install symfony/symfony v3.2.10
    - Conclusion: don't install symfony/symfony v3.2.9
    - Conclusion: don't install symfony/symfony v3.2.8
    - Conclusion: don't install symfony/symfony v3.2.7
    - Conclusion: don't install symfony/symfony v3.2.6
    - Conclusion: don't install symfony/symfony v3.2.5
    - Conclusion: don't install symfony/symfony v3.2.4
    - Conclusion: don't install symfony/symfony v3.2.3
    - Conclusion: don't install symfony/symfony v3.2.2
    - Conclusion: don't install symfony/symfony v3.2.1
    - Conclusion: don't install symfony/symfony v3.2.0
    - Conclusion: don't install symfony/symfony v3.1.10
    - Conclusion: don't install symfony/symfony v3.1.9
    - Conclusion: don't install symfony/symfony v3.1.8
    - Conclusion: don't install symfony/symfony v3.1.7
    - Conclusion: don't install symfony/symfony v3.1.6
    - Conclusion: don't install symfony/symfony v3.1.5
    - Conclusion: don't install symfony/symfony v3.1.4
    - Conclusion: don't install symfony/symfony v3.1.3
    - Conclusion: don't install symfony/symfony v3.1.2
    - Conclusion: don't install symfony/symfony v3.1.1
    - Conclusion: don't install symfony/symfony v3.1.0
    - Conclusion: don't install symfony/symfony v3.0.9
    - Conclusion: don't install symfony/symfony v3.0.8
    - Conclusion: don't install symfony/symfony v3.0.7
    - Conclusion: don't install symfony/symfony v3.0.6
    - Conclusion: don't install symfony/symfony v3.0.5
    - Conclusion: don't install symfony/symfony v3.0.4
    - Conclusion: don't install symfony/symfony v3.0.3
    - Conclusion: don't install symfony/symfony v3.0.2
    - Installation request for guzzle/guzzle (installed at v3.9.3) -> satisfiable by guzzle/guzzle[v3.9.3].
    - Conclusion: don't install symfony/symfony v3.0.1
    - sensio/framework-extra-bundle v5.1.6 requires symfony/http-kernel ^3.3|^4.0 -> satisfiable by symfony/symfony[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8], symfony/http-kernel[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8].
    - sensio/framework-extra-bundle v5.1.5 requires symfony/http-kernel ^3.3|^4.0 -> satisfiable by symfony/symfony[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8], symfony/http-kernel[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8].
    - sensio/framework-extra-bundle v5.1.4 requires symfony/http-kernel ^3.3|^4.0 -> satisfiable by symfony/symfony[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8], symfony/http-kernel[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8].
    - sensio/framework-extra-bundle v5.1.3 requires symfony/http-kernel ^3.3|^4.0 -> satisfiable by symfony/symfony[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8], symfony/http-kernel[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8].
    - sensio/framework-extra-bundle v5.1.2 requires symfony/http-kernel ^3.3|^4.0 -> satisfiable by symfony/symfony[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8], symfony/http-kernel[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8].
    - sensio/framework-extra-bundle v5.1.1 requires symfony/http-kernel ^3.3|^4.0 -> satisfiable by symfony/symfony[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8], symfony/http-kernel[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8].
    - sensio/framework-extra-bundle v5.1.0 requires symfony/http-kernel ^3.3|^4.0 -> satisfiable by symfony/symfony[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8], symfony/http-kernel[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8].
    - sensio/framework-extra-bundle v5.0.1 requires symfony/http-kernel ^3.3|^4.0 -> satisfiable by symfony/symfony[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8], symfony/http-kernel[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8].
    - sensio/framework-extra-bundle v5.0.0 requires symfony/http-kernel ^3.3|^4.0 -> satisfiable by symfony/symfony[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8], symfony/http-kernel[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8].
    - symfony/http-kernel v3.3.0 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.1 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.10 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.11 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.12 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.13 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.14 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.15 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.16 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.2 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.3 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.4 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.5 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.6 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.7 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.8 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.3.9 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.4.0 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.4.1 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.4.2 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.4.3 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.4.4 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.4.5 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.4.6 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.4.7 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v3.4.8 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v4.0.0 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v4.0.1 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v4.0.2 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v4.0.3 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v4.0.4 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v4.0.5 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v4.0.6 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v4.0.7 conflicts with symfony/symfony[v3.0.0].
    - symfony/http-kernel v4.0.8 conflicts with symfony/symfony[v3.0.0].
    - Installation request for symfony/symfony ~3.0 -> satisfiable by symfony/symfony[v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.1, v3.1.10, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.2.0, v3.2.1, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8].
    - Installation request for sensio/framework-extra-bundle ^5.0.0 -> satisfiable by sensio/framework-extra-bundle[v5.0.0, v5.0.1, v5.1.0, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6].

这是我的旧 composer.json:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "minimum-stability": "stable",
    "autoload": {
        "psr-0": {
            "": "src/",
            "SymfonyStandard": "app/"
        }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.8.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~3.0",
        "sensio/framework-extra-bundle": "~3.0",
        "incenteev/composer-parameter-handler": "~2.0",
        "facebook/php-sdk-v4": "^5.0",
        "google/apiclient": "1.0.*@beta",
        "ircmaxell/password-compat": "~1.0",
        "symfony/filesystem": "~2.6",
        "symfony/dom-crawler": "~2.6",
        "symfony/yaml": "~2.6",
        "symfony/serializer": "~2.6",
        "omnipay/payu": "^2.0@dev",
        "omnipay/paypal": "^2.5"
    },
    "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"
        ],
        "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"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.5-dev"
        }
    }
}

这是我的新 composer.json:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": {
            "": "src/",
            "SymfonyStandard": "app/"
        }
    },
    "require": {
        "php": ">=5.5.9",
        "symfony/symfony": "~3.0",
        "doctrine/orm": "^2.5",
        "doctrine/doctrine-bundle": "^1.6",
        "twig/twig": "^1.0||^2.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "^2.6.4",
        "symfony/monolog-bundle": "^3.1.0",
        "sensio/distribution-bundle": "^5.0.19",
        "sensio/framework-extra-bundle": "^5.0.0",
        "incenteev/composer-parameter-handler": "^2.0",
        "symfony/polyfill-apcu": "^1.0",
        "facebook/php-sdk-v4": "^5.0",
        "google/apiclient": "1.0.*@beta",
        "ircmaxell/password-compat": "~1.0",
        "symfony/filesystem": "~2.6",
        "symfony/dom-crawler": "~2.6",
        "symfony/yaml": "~2.6",
        "symfony/serializer": "~2.6",
        "omnipay/payu": "^2.0@dev",
        "omnipay/paypal": "^2.5"
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0",
        "symfony/phpunit-bridge": "^3.0"
    },
    "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"
        ],
        "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"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "3.4-dev"
        }
    }
}

老实说,上次我在 Symfony 上做某事是在 3 年前,但我真的很想要我的旧项目.如果有人能帮我解决问题.

To be honest last time I was doing something in Symfony 3 years ago but I really wanted to my old project. If someone could help me out what's wrong.

我已经尝试将 minimum-stability:stable 更改为 minimum-stability:dev,但没有奏效.

I already tried to change minimum-stability:stable to minimum-stability:dev but it didn't worked.

推荐答案

升级到 3.4.*,因为它是最新的 LTS 版本.4.4 出来后应该更新到第 4 版(LTS 版本).

Upgrade to 3.4.*, because it's the latest LTS version. Updating to version 4 should be done when 4.4 comes out (it will be LTS version).

尝试调整您的配置,如下所示并运行 composer update.以下配置带有自动装配.考虑一下您是否想使用它,但我建议,因为通过使用类型提示在构造函数中获取服务/控制器中的依赖项会更舒服.

Try to adjust your configuration like following and run the composer update. Following configuration comes with autowiring. Consider if you want to use that, but I suggest, because it's more comfortable to get your dependencies in services/controllers at constructor by using type hints.

1) Composer.json

1) Composer.json

"symfony/symfony": "3.4.*",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"twig/twig": "^1.0||^2.0",
"symfony/monolog-bundle": "^3.1.0",

2) app/config/services.yml

2) app/config/services.yml

services:
    _defaults:
        autowire: true # Automatically injects dependencies in your services
        autoconfigure: true
        public: false
        bind:
            # Nice feature here. Local Binding. Read about it at documentation.


    # makes classes in AppBundle available to be used as services
    AppBundle\:
        resource: '../../src/AppBundle/*'
    # exclude directories || files (if service is unused, it will be removed anyway)
        exclude: '../../src/AppBundle/{Entity,Repository,Tests}'
    AppBundle\Controller\:
        resource: '../../src/AppBundle/Controller'
        public: true
        tags: ['controller.service_arguments']

3) AppBundle/Resources/config/services.yml

3) AppBundle/Resources/config/services.yml

   services:
    _defaults:
        autowire: true
        autoconfigure: true
        public: false

这篇关于Symfony 更新 2.8 到 3.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆