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

[SymfonyCon Lisbon] A Year of Symfony

Sarah KHALIL
December 07, 2018

[SymfonyCon Lisbon] A Year of Symfony

Let's review what happened during the last year: basically we'll see and/or discover nice new features that appeared since the last year.

Sarah KHALIL

December 07, 2018
Tweet

More Decks by Sarah KHALIL

Other Decks in Technology

Transcript

  1. A Y E A R O F

    View full-size slide

  2. A Y E A R O F

    View full-size slide

  3. Nicolas Grekas
    @nicolasgrekas
    Sarah Khalil
    @saro0h

    View full-size slide

  4. B E F O R E B O A R D I N G , M A K E Y O U R S E L F C O M F Y

    View full-size slide

  5. Get visibility and know others from the community
    connect.symfony.com
    H O W A B O U T N E T W O R K I N G ?

    View full-size slide

  6. W E S T I L L H AV E S O M E B E F O R E ?
    certification.symfony.com

    View full-size slide

  7. S Y M F O N Y. C O M

    View full-size slide

  8. symfony.com/blog

    View full-size slide

  9. D A R K T H E M E

    View full-size slide

  10. D A R K T H E M E

    View full-size slide

  11. symfonycasts.com
    '
    '

    View full-size slide

  12. W H E R E W E ’ R E G O I N G ?

    View full-size slide

  13. W H E R E W E ’ R E G O I N G ?

    View full-size slide

  14. symfony.com/events
    D E C L A R E A N D D I S C O V E R

    View full-size slide

  15. • R E D - O F F I C I A L
    • B L U E - C O M M U N I T Y
    • G R E Y - PA S T
    symfony.com/events
    D E C L A R E A N D D I S C O V E R

    View full-size slide

  16. • R E D - O F F I C I A L
    • B L U E - C O M M U N I T Y
    • G R E Y - PA S T
    F O R T H E F I R S T T I M E I N
    V I E T N A M ) , I N D I A *

    symfony.com/events
    D E C L A R E A N D D I S C O V E R

    View full-size slide

  17. L A S T M I N U T E C H E C K S

    View full-size slide

  18. E V E RY O N E ’ S H E R E ?
    Slack Members: ~8000
    Code contributors: ~2000
    Doc contributors: ~1900
    CARE Team : 3
    symfony.com/blog/diversity-initiative-the-care-team

    View full-size slide

  19. E V E RY O N E ’ S H E R E ?
    symfony.com/roadmap
    4.1 - 4.2
    - 2.7 - 2.8 - 4.0

    View full-size slide

  20. B O A R D I N G

    View full-size slide

  21. O U R T R I P
    S Y M F O N Y / S Y M F O N Y
    S Y M F O N Y / O T H E R S

    W E A R E
    H E R E

    View full-size slide

  22. P R E PA R E F O R TA K E O F F

    View full-size slide

  23. C O N S O L E

    View full-size slide

  24. O V E R W R I T E O U T P U T S , D E L E T E O U T P U T C O N T E N T, M U LT I P L E
    P R O G R E S S B A R S , M O D I F Y C O N T E N T O F TA B L E S , G E T ☕
    https://symfony.com/blog/new-in-symfony-4-1-advanced-console-output

    View full-size slide

  25. O V E R W R I T E O U T P U T S , D E L E T E O U T P U T C O N T E N T, M U LT I P L E
    P R O G R E S S B A R S , M O D I F Y C O N T E N T O F TA B L E S , G E T ☕
    https://symfony.com/blog/new-in-symfony-4-1-advanced-console-output

    View full-size slide

  26. O V E R W R I T E O U T P U T S , D E L E T E O U T P U T C O N T E N T, M U LT I P L E
    P R O G R E S S B A R S , M O D I F Y C O N T E N T O F TA B L E S , G E T ☕
    https://symfony.com/blog/new-in-symfony-4-1-advanced-console-output

    View full-size slide

  27. O V E R W R I T E O U T P U T S , D E L E T E O U T P U T C O N T E N T, M U LT I P L E
    P R O G R E S S B A R S , M O D I F Y C O N T E N T O F TA B L E S , G E T ☕
    https://symfony.com/blog/new-in-symfony-4-1-advanced-console-output

    View full-size slide

  28. H E A D E R A N D F O O T E R T I T L E S , A N D C U S T O M M A X
    W I D T H F O R E A C H C O L U M N S 1
    https://symfony.com/blog/new-in-symfony-4-2-console-tables-improvements

    View full-size slide

  29. C A C H E S TA M P E D E P R O T E C T I O N
    • Let’s say you cache a heavy page
    • The cache expires…
    • People request that page…
    • Your system is doomed -
    https://symfony.com/blog/new-in-symfony-4-2-cache-stampede-protection
    • Regenerate the cache before the
    cache expires thanks to
    probabilistic decision ()
    S O L U T I O N

    View full-size slide

  30. Brand new MarshallerInterface
    Automatically uses a
    default serializer that uses
    Igbinary if available

    https://github.com/symfony/symfony/pull/27645

    View full-size slide

  31. W E B P R O F I L E R

    View full-size slide

  32. K N O W I F A N A J A X R E Q U E S T I S S T I L L R U N N I N G 7
    8
    https://symfony.com/blog/new-in-symfony-4-1-ajax-improvements

    View full-size slide

  33. K N O W I F A N A J A X R E Q U E S T I S S T I L L R U N N I N G 7
    8
    https://symfony.com/blog/new-in-symfony-4-1-ajax-improvements

    View full-size slide

  34. W O R K I N G W I T H S PA ?
    M I S S I N G T H E D E B U G T O O L B A R ?
    $response->headers->set('Symfony-Debug-Toolbar-Replace', 1);
    https://symfony.com/blog/new-in-symfony-4-1-self-updating-debug-toolbar
    N E W H T T P H E A D E R
    Replace the WDT with the new one associated with the current response

    View full-size slide


  35. D O T E N V VA R I A B L E S
    https://github.com/symfony/symfony/pull/25166

    View full-size slide

  36. P R O F I L E R L O G F I LT E R
    https://symfony.com/blog/new-in-symfony-4-2-profiler-log-filter

    View full-size slide

  37. D E TA I L E D S E C U R I T Y V O T E R S D E C I S I O N : ;
    https://symfony.com/blog/new-in-symfony-4-2-detailed-security-voters-decisions

    View full-size slide

  38. D E TA I L E D S E C U R I T Y V O T E R S D E C I S I O N : ;
    https://symfony.com/blog/new-in-symfony-4-2-detailed-security-voters-decisions

    View full-size slide

  39. H T T P F O U N D AT I O N

    View full-size slide

  40. M I G R AT E S E S S I O N F R O M A WAY T O A N O T H E R
    From filesystem to database without losing any session data?
    https://symfony.com/blog/new-in-symfony-4-1-session-improvements#allow-to-migrate-sessions
    MigratingSessionHandler class
    $sessionStorage = new MigratingSessionHandler($oldSessionStorage, $newSessionStorage);

    View full-size slide

  41. M E S S E N G E R

    New component

    View full-size slide

  42. • Since 4.1
    • Still experimental (lots of changes during the last 6 months)
    • Documentation still need love

    View full-size slide

  43. P R O C E S S

    View full-size slide

  44. P R E PA R E D C O M M A N D L I N E F T W
    // Deprecated
    $p = new Process("ls -l");
    // Go ahead for
    $p = new Process(["ls", "-l"]);
    https://github.com/symfony/symfony/pull/27821

    View full-size slide

  45. WA I T U N T I L T H E P R O C E S S E S A R E R E A D Y
    Avoid sleep(5); =
    $p->waitUntil($callback);
    https://symfony.com/blog/new-in-symfony-4-2-wait-until-processes-are-ready

    View full-size slide

  46. M AT C H 7 7 . 7 X FA S T E R B Y C O M P I L I N G R O U T E S I N
    O N E R E G E X P
    https://symfony.com/blog/new-in-symfony-4-1-fastest-php-router

    View full-size slide

  47. I M P L E M E N T I N G I 1 8 N R O U T I N G
    https://symfony.com/blog/new-in-symfony-4-1-internationalized-routing

    View full-size slide

  48. A L L O W I N L I N E D E F I N I T I O N O F R E Q U I R E M E N T S
    A N D D E FA U LT S
    https://symfony.com/blog/new-in-symfony-4-1-inlined-routing-configuration

    View full-size slide

  49. T R A N S L AT I O N

    View full-size slide

  50. U S E T H E I C U M E S S A G E F O R M AT
    messages+intl-icu.xlf
    https://github.com/symfony/symfony/pull/28952
    There { COUNT, plural,
    =0 {are no results}
    one {is one result}
    other {are # results}
    }

    View full-size slide

  51. VA R D U M P E R

    View full-size slide

  52. C O L L E C T D U M P T H R O U G H A S E R V E R D U M P E R
    https://github.com/symfony/symfony/pull/23831

    View full-size slide

  53. C O L L E C T D U M P T H R O U G H A S E R V E R D U M P E R
    https://github.com/symfony/symfony/pull/23831

    View full-size slide

  54. O U R T R I P
    S Y M F O N Y / S Y M F O N Y
    S Y M F O N Y / O T H E R S

    W E A R E
    H E R E

    View full-size slide

  55. C O N T R A C T

    New component

    View full-size slide

  56. Currently subnamespaces for:
    • Cache
    • Translation
    • Subnamspaces
    https://github.com/symfony/symfony/pull/27093
    I N T E R O P E R A B L E I N T E R FA C E S

    View full-size slide

  57. PA N T H E R

    New component

    View full-size slide

  58. U S E A R E A L B R O W S E R F O R Y O U R F U N C T I O N A L T E S T S
    https://symfony.com/blog/introducing-symfony-panther-a-browser-testing-and-web-scrapping-library-for-php

    View full-size slide


  59. • Download packages in parallel
    • Blazing fast as legacy tags are removed (dependency resolution is faster)
    • 50% faster to create and update project
    https://github.com/symfony/flex/pull/261
    https://github.com/symfony/flex/pull/378
    https://symfony.com/blog/creating-and-updating-symfony-projects-much-faster

    View full-size slide

  60. M A K E R B U N D L E

    View full-size slide

  61. G R E AT C O M M A N D S T O S TA RT Q U I C K LY
    make:crud
    make:form
    make:entity
    make:user
    make:auth
    https://symfony.com/blog/new-in-makerbundle-1-8-instant-user-login-form-commands
    https://github.com/symfony/maker-bundle/releases

    View full-size slide

  62. L A N D I N G

    View full-size slide

  63. L A N D I N G

    View full-size slide

  64. H O W A B O U T C O N T I N U I N G T H E
    A D V E N T U R E ?

    View full-size slide

  65. H O W A B O U T C O N T I N U I N G T H E
    A D V E N T U R E ?

    View full-size slide

  66. M A K E T H E A D V E N T U R E M O R E E X C I T I N G : C O N T R I B U T I O N S
    • Recipes
    (@ last year ➡ 376 PRs in official repo & 484 PRs in contrib repo B)

    View full-size slide

  67. M A K E T H E A D V E N T U R E M O R E E X C I T I N G : C O N T R I B U T I O N S
    • Recipes
    (@ last year ➡ 376 PRs in official repo & 484 PRs in contrib repo B)
    • Mentoring (symfony.com/blog/diversity-initiative-update-mentoring-
    and-conference-organization)

    View full-size slide

  68. M A K E T H E A D V E N T U R E M O R E E X C I T I N G : C O N T R I B U T I O N S
    • Recipes
    (@ last year ➡ 376 PRs in official repo & 484 PRs in contrib repo B)
    • Mentoring (symfony.com/blog/diversity-initiative-update-mentoring-
    and-conference-organization)
    • Get visibility on symfony.com

    View full-size slide

  69. G E T I N V O LV E D I N D I S C U S S I O N S
    Discussion on preparing the compatibility with Monolog 2
    And many more!
    https://github.com/symfony/symfony/issues/27857

    View full-size slide

  70. G E T I N V O LV E D I N D I S C U S S I O N S
    Discussion on preparing the compatibility with Monolog 2
    And many more!
    https://github.com/symfony/symfony/issues/27857

    View full-size slide

  71. H E L P TA K I N G I N A B A N D O N E D FA M O U S PA C K A G E S
    https://symfony.com/blog/finding-a-new-home-for-ivoryckeditorbundle

    View full-size slide

  72. symfony.com/blog/diversity-initiative-the-care-team
    symfony.com/doc/current/contributing/code_of_conduct

    View full-size slide

  73. symfony.com/blog/diversity-initiative-the-care-team
    symfony.com/doc/current/contributing/code_of_conduct

    View full-size slide

  74. T R AV E L M O R E B Y TA L K I N G AT
    C O N F E R E N C E S !
    https://symfony.com/blog/inclusivity-and-diversity-in-cfp-at-the-upcoming-symfony-conferences
    Get helped E

    View full-size slide

  75. B Thank you, to all of you
    Take care of you and others

    View full-size slide

  76. B Thank you, to all of you
    Take care of you and others

    View full-size slide

  77. D O N ’ T F O R G E T T O G I V E F E E D B A C K S
    https://joind.in/talk/87337

    View full-size slide

  78. D O N ’ T F O R G E T T O G I V E F E E D B A C K S
    https://joind.in/talk/87337
    WA K A N D A , I S M Y N A M E

    View full-size slide