Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Migrating to Symfony 4

Migrating to Symfony 4

This talk goes through the process of migrating your existing Symfony 2/3 application to Symfony 4 using the new Flex-style directory structure.

Denis Brumann

May 12, 2018
Tweet

More Decks by Denis Brumann

Other Decks in Programming

Transcript

  1. Denis Brumann

    @dbrumann

    [email protected]
    Migrating to Symfony 4
    1
    from Symfony 2 & 3

    View full-size slide

  2. Denis Brumann

    @dbrumann

    [email protected]
    2
    Denis Brumann

    Software Developer

    Berlin, Germany

    View full-size slide

  3. Denis Brumann

    @dbrumann

    [email protected]
    3
    https://symfony.com/doc/current/contributing/community/releases.html

    View full-size slide

  4. Denis Brumann

    @dbrumann

    [email protected]
    4
    https://symfony.com/roadmap
    Symfony Version End of Support End Of Security Fixes
    2.8 (LTS) November 2018 November 2019
    3.4 (LTS) November 2020 November 2021
    4.0 July 2018 January 2019

    View full-size slide

  5. Denis Brumann

    @dbrumann

    [email protected]
    5
    Flex is not your only option

    View full-size slide

  6. Denis Brumann

    @dbrumann

    [email protected]
    6

    View full-size slide

  7. Denis Brumann

    @dbrumann

    [email protected]
    7
    https://symfony.com/blog/new-in-symfony-3-3-persisted-deprecation-logs

    View full-size slide

  8. Denis Brumann

    @dbrumann

    [email protected]
    8
    Step 1: Add symfony/flex as a dependency
    from Symfony 3.4

    View full-size slide

  9. Denis Brumann

    @dbrumann

    [email protected]
    9
    Step 2: Remove the symfony/symfony package

    View full-size slide

  10. Denis Brumann

    @dbrumann

    [email protected]
    10
    Step 3: Make sure symfony/symfony is not kept

    View full-size slide

  11. Denis Brumann

    @dbrumann

    [email protected]
    11
    optionally: stay with Symfony 3.4 first

    View full-size slide

  12. Denis Brumann

    @dbrumann

    [email protected]
    12
    Step 4: Manually require your Symfony dependencies

    View full-size slide

  13. Denis Brumann

    @dbrumann

    [email protected]
    13
    Step 5: Copy & adjust your configuration

    View full-size slide

  14. Denis Brumann

    @dbrumann

    [email protected]
    14
    Symfony 3
    Symfony 4

    View full-size slide

  15. Denis Brumann

    @dbrumann

    [email protected]
    14
    Symfony 3
    Symfony 4

    View full-size slide

  16. Denis Brumann

    @dbrumann

    [email protected]
    14
    Symfony 3
    Symfony 4

    View full-size slide

  17. Denis Brumann

    @dbrumann

    [email protected]
    15

    View full-size slide

  18. Denis Brumann

    @dbrumann

    [email protected]
    16

    View full-size slide

  19. Denis Brumann

    @dbrumann

    [email protected]
    16

    View full-size slide

  20. Denis Brumann

    @dbrumann

    [email protected]
    16

    View full-size slide

  21. Denis Brumann

    @dbrumann

    [email protected]
    16

    View full-size slide

  22. Denis Brumann

    @dbrumann

    [email protected]
    16

    View full-size slide

  23. Denis Brumann

    @dbrumann

    [email protected]
    16

    View full-size slide

  24. Denis Brumann

    @dbrumann

    [email protected]
    16

    View full-size slide

  25. Denis Brumann

    @dbrumann

    [email protected]
    17
    Step 6a: Move src/AppBundle/* to src/*
    Step 6b: Move namespace AppBundle\ to
    App\
    Step 6c: Update autoload-section in
    composer.json

    View full-size slide

  26. Denis Brumann

    @dbrumann

    [email protected]
    18
    Step 7: Move templates, translations & assets

    View full-size slide

  27. Denis Brumann

    @dbrumann

    [email protected]
    19
    Step 8: Create public/index.php

    View full-size slide

  28. Denis Brumann

    @dbrumann

    [email protected]
    20
    Step 9: Create bin/console

    View full-size slide

  29. Denis Brumann

    @dbrumann

    [email protected]
    21
    https://symfony.com/doc/current/setup/flex.html#upgrade-to-flex
    https://symfony.com/doc/current/setup/upgrade_major.html

    View full-size slide

  30. Denis Brumann

    @dbrumann

    [email protected]
    22
    Questions?

    View full-size slide