web-dev-qa-db-ja.com

Symfonyアップデート2.8から3.4

古いSymfonyプロジェクトを2.8から4.0にアップグレードしたかったのですが、アップグレード時に2.8から3.4にスタックしました。このチュートリアルをアップグレードに使用しました Symfony 3.4への移行

composer Composer UpgradeErrors :を介して更新しようとしたときにいくつかのエラーが発生しました

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

正直なところ、前回は3年前にSymfonyで何かをしていましたが、本当に古いプロジェクトにやりたかったのです。誰かが私に何が悪いのか助けてくれるなら。

私はすでにminimum-stability:stableminimum-stability:devに変更しようとしました-)しかし、それは機能しませんでした。

4
Tadeusz Hyzy

最新のLTSバージョンであるため、3.4。*にアップグレードします。バージョン4への更新は、4.4がリリースされたときに実行する必要があります(LTSバージョンになります)。

次のように構成を調整して、composer update。次の構成には自動配線が付属しています。これを使用するかどうかを検討してください。ただし、サービスへの依存関係を取得する方が快適なので、お勧めします。タイプヒントを使用したコンストラクターの/ controllers。

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

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

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