Symfony Update 2.8 to 3.4
Asked Answered
N

1

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.

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].

Here is my old 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"
        }
    }
}

Here is my new 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"
        }
    }
}

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.

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

Niggerhead answered 19/4, 2018 at 9:31 Comment(5)
did you try to update mentioned dependencies to required versions manually?Intrinsic
Manually you mean inside json file? Yes I did that. Maybe I should try to use composer to update it?Niggerhead
using composer like this composer require symfony/monolog-bundle:^3.1.0 etc.Intrinsic
Hi I tried to do it but it also have some issue on require sensio/framework-extra-bundle:^5.0.0 and require sensio/symfony:^3.4.*. Other from TUTORIAL is ok.Niggerhead
you can resolve every new issue manually with composer require, it should not be too much of themIntrinsic
R
5

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).

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

"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
Riant answered 20/4, 2018 at 12:36 Comment(3)
Thanks for the answer. I'll try it tonight :)Niggerhead
Thanks, it helped me. I needed to do some more adjustment inside composer.json and it updated :) Now I need to repair some code problems. Thanks a lot :)Niggerhead
Im glad, it helped you. :)Riant

© 2022 - 2024 — McMap. All rights reserved.