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

SymfonyCon 2013 Keynote

SymfonyCon 2013 Keynote

9a22d09f92d50fa3d2a16766d0ba52f8?s=128

Fabien Potencier

December 13, 2013
Tweet

Transcript

  1. State of the Symfony World FabienPotencier @fabpot h﬙ps:/ /secure.flickr.com/photos/keithmwilliams/5727282051

  2. State of the Symfony World FabienPotencier @fabpot h﬙ps:/ /secure.flickr.com/photos/keithmwilliams/5727282051

  3. Stats https://secure.flickr.com/photos/cdm/39449485

  4. Twig 1.9M downloads

  5. 1.7M downloads

  6. ~22M downloads

  7. Console Event Dispatcher Finder HTTP Foundation HTTP Kernel Yaml Process

    Routing Translation Dom Crawler Filesystem CSS Selector Browser Kit ICU Debug
  8. easybook Sulu CMF

  9. The Symfony Family https://secure.flickr.com/photos/65073487@N00/3132301417

  10. h﬙p:/ /symfony.com/components

  11. h﬙p:/ /symfony.com/components/H﬙pKernel

  12. h﬙p:/ /symfony.com/projects

  13. h﬙p:/ /symfony.com/projects/phpbb

  14. Add your project to the SymfonyFamily today! h﬙ps:/ /github.com/symfony/symfony-marketing/tree/component/projects 40+

    projects https://secure.flickr.com/photos/kismihok/2894418909
  15. symfony.com https://secure.flickr.com/photos/mmoosa/3501992313

  16. None
  17. None
  18. h﬙p:/ /symfony.com/roadmap

  19. Processes https://secure.flickr.com/photos/mamzellekaelle/9954858305

  20. DD4E C589 15FF 888A 8A3D D898 EB8A A69A 566C 0795

    http://fabien.potencier.org/about
  21. $ git show --show-signature v2.2.11 tag v2.2.11 Tagger: Fabien Potencier

    <fabien.potencier@gmail.com> Date: Mon Dec 2 08:14:10 2013 +0100 created tag 2.2.11 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (Darwin) iF4EABEIAAYFAlKcM0IACgkQ64qmmlZsB5X7RwD9F9musp/IGt0NJdlUv6/V27NC o9KciAtVdHY8wQ8NuDsBAJ1X483uJqPzhP1dy1LdCIgFPAmw/qYmKL2m2wD7Bega =142E -----END PGP SIGNATURE----- commit 6a9c223b066a2553b8f59fd26f84ea630eff403c Author: Fabien Potencier <fabien.potencier@gmail.com> Date: Mon Dec 2 08:14:10 2013 +0100 updated VERSION for 2.2.11
  22. $ git tag -v v2.2.11 object 6a9c223b066a2553b8f59fd26f84ea630eff403c type commit tag

    v2.2.11 tagger Fabien Potencier <fabien.potencier@gmail.com> 1385968450 +0100 created tag 2.2.11 gpg: Signature made Mon Dec 2 08:14:10 2013 CET using DSA key ID 566C0795 gpg: Good signature from "Fabien Potencier (fabpot) <fabien@symfony.com>" gpg: aka "Fabien Potencier (fabpot) <fabien@potencier.org>
  23. fabpot’s tools https://secure.flickr.com/photos/craigwalkowicz/4599433039

  24. Nov 2010

  25. $ gh merge 1234

  26. Working on symfony/symfony (branch master) Merging Pull Request 9196: fabpot:table-compact

    Category (feature, bug, minor)?
  27. bug #9607 [HttpKernel] Fix a bug when using the kernel...

    (gnutix) bug #9597 [Security] Typos in Security's ExpressionLanguage (ovrflo) minor #9598 [SecurityBundle] minor simplification in ... (shieldo) minor #9599 [Validator] Typo and better wording for ... (Danez) minor #9588 Add missing german translation for validators (Danez) feature #9587 [SecurityBundle] Added csrf_token_generator... (shieldo) feature #9578 [DomCrawler] Fixes `attr` method returning ... (aik099)
  28. git log --grep="bug *#" --merges --format="%s" \ v2.2.10...v2.2.11

  29. commit b00289a6d0472f09b44d6aa0cb2411c36453ee31 Merge: f2b60e9 ea91533 Author: Fabien Potencier <fabien.potencier@gmail.com> Date:

    Tue Oct 8 10:34:28 2013 +0200 bug #9236 [Form] fix missing use statement for exception UnexpectedTypeException (jaugustin) This PR was merged into the master branch. Discussion ---------- [Form] fix missing use statement for ex UnexpectedTypeException | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | | Fixed tickets | | License | MIT | Doc PR | fix missing use statement for exception `Symfony\Component\Form \Exception\UnexpectedTypeException`
  30. 2.3 2.4 2.5-dev bug fixes

  31. 2.3 2.4 2.5-dev new features

  32. gh merge 1234 This PR was merged into the master

    branch. gh merge 1234 --switch=2.2 This PR was submitted for the 2.4 branch but it was merged into the 2.2 branch instead.
  33. gh merge 1234 This PR was merged into the master

    branch. gh merge 1234 --squash This PR was squashed before being merged into the 2.2 branch.
  34. gh merge 1234 --squash --switch=2.2 This PR was submitted for

    the 2.4 branch but it was squashed and merged into the 2.2 branch instead.
  35. gh merge 1234 This PR was merged into the 2.5-dev

    branch. gh merge 1234 This PR was merged into the master branch.
  36. git fetch origin refs/notes/*:refs/notes/* fetch = +refs/notes/*:refs/notes/*

  37. git log -1 --show-notes=github-comments 5bd18c0 commit 5bd18c01a3c20ddd3710b798b33317ca709cb826 Merge: 04d767d da9bee0

    Author: Fabien Potencier <fabien.potencier@gmail.com> Date: Wed Oct 2 14:11:08 2013 +0200 feature #9196 [Console] added a compact layout for table (fabpot) This PR was merged into the master branch. Discussion ---------- [Console] added a compact layout for the table helper ... Notes (github-comments): ------------------------------------------------------------------- by stof at 2013-10-02T07:44:21Z :+1:
  38. $ gh move symfony/Console#1234

  39. $ gh label --new --issues

  40. None
  41. None
  42. None
  43. https://gist.github.com/fabpot/7887553

  44. Coding Standards Madness

  45. Coding Standards Madness Typos Madness

  46. ubot.io https://secure.flickr.com/photos/donsolo/2472473711

  47. common ﬚po fix CS fix

  48. ubot.io active later today! https://secure.flickr.com/photos/donsolo/2472473711

  49. Blogs at symfony.es Writes a week of Symfony - 2007

    Published a book on Symfony2 organizes Javier Eguiluz Evangelist at
  50. code pull requests github tests community local events certification documentation

    marketing blogs bundles
  51. code pull requests github tests community local events certification documentation

    marketing blogs bundles
  52. code pull requests github tests community local events certification documentation

    marketing blogs bundles
  53. 4 5 3 2 1 Five random ideas to improve

    Symfony
  54. 4 5 3 2 1 Five random ideas to improve

    Symfony
  55. The Symfony download experience

  56. The Symfony download experience

  57. Note: This is a wireframe mockup, not a graphic design

    The new Symfony download experience Download Symfony Framework Install Symfony 2.3 via Composer $ composer create-project symfony/framework-standard-edition my-project/ 2.3.7 What is Composer and how to install it DOWNLOAD SYMFONY 2.3.7 Download Symfony 2.3 as a ZIP file Uncompress the file under your web server root directory Choose Symfony 2.3 for long-term support Choose Symfony 2.4 for the latest features (supported until May 2016) (supported until July 2014) SAME AS SHOWN ABOVE
  58. The new Symfony experience Contributors Community Bundles Blog Download

  59. The new Symfony experience Contributors Community Bundles Blog Download

  60. 4 5 3 2 1 Five random ideas to improve

    Symfony
  61. The symfony-devs mailing list

  62. 4 5 3 2 1 Five random ideas to improve

    Symfony
  63. Do you regularly visit the official Symfony blog?

  64. Do you regularly visit the official Twig blog?

  65. A modern Twig snippet {{ max({ ... }) }} {{

    min({ ... }) }} {{ 42.55|round }} {{ 42.55|round(3, 'floor') }} {{ source('layout.html.twig') }} {{ source('@admin/common/_sidebar.twig') }} TWIG 1.15
  66. blog.twig .sensiolabs.org blog .swiftmailer.org blog.silex .sensiolabs.org symfony.com/blog TWIG SF SILEX

    SWIF T SF SF TWIG SILEX TWIG SF SF SF SF SF SF SF
  67. blog.twig .sensiolabs.org blog .swiftmailer.org blog.silex .sensiolabs.org symfony.com/blog TWIG SF SILEX

    SWIF T SF SF TWIG SILEX TWIG SF
  68. 4 5 3 2 1 Five random ideas to improve

    Symfony
  69. None
  70. The French Community afsy.fr/ avent/2013 sfPot Paris / Marseille

  71. The Spanish Community deSymfony 2013 Madrid

  72. The German Community Hamburg Cologne Berlin Munich

  73. Symfony Camp UA 2013 Symfony Tunisia 2013 Symfony Day Italy

    2013 November Camp Sweden
  74. . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . symfony.com/community/france Symfony Community in France Events 22 DEC 9 JAN Blogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Community members
  75. . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . symfony.com/community/france Symfony Community in France Events 22 DEC 9 JAN Blogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Community members
  76. 4 5 3 2 1 Five random ideas to improve

    Symfony
  77. +2,200 bundles

  78. 8 CAPTCHA There are bundles for

  79. None
  80. please share your ideas to improve Symfony

  81. Performance https://secure.flickr.com/photos/fatboyke/2668411239

  82. Twig C extension foo.bar

  83. Pimple 2.0

  84. $app['shared_service'] = $app->share(function () { return new stdClass(); }); $app['factory_service']

    = function () { return new stdClass(); }; Pimple 1.x 99% of all services
  85. $app['shared_service'] = function () { return new stdClass(); }; $app['factory_service']

    = $app->factory(function () { return new stdClass(); }); Pimple 2.x 99% of all services
  86. in ms Pimple1 Pimple2 get shared 116 21 x 5.5

    set shared 78 26 x 3.0 get factory 112 116 x 1.0 set factory 23 172 x 0.13 Pimple
  87. https://secure.flickr.com/photos/haniamir/1810369486

  88. in ms Pimple2 PHP Pimple2 hhvm get shared 21 6

    x 3.5 set shared 26 8.8 x 2.9 get factory 116 60 x 1.9 set factory 172 56 x 3.1 Pimple
  89. in ms Pimple2 Pimple2C get shared 21 2.7 x 7.8

    set shared 26 5.5 x 4.7 get factory 116 42 x 2.7 set factory 172 29 x 5.9 Pimple
  90. in ms Pimple2 hhvm Pimple2C get shared 6 2.7 x

    2.2 set shared 8.8 5.5 x 1.6 get factory 60 42 x 1.4 set factory 56 29 x 1.9 Pimple
  91. in ms Pimple1 Pimple2C get shared 116 2.7 x 43

    set shared 78 5.5 x 15 get factory 112 42 x 3 set factory 23 29 x 0.8 Pimple
  92. Pimple 2.0 C version

  93. Release Manager for 5.5/5.6 PHP Contributor Wrote a book on

    PHP performance Works on a book on PHP internals h﬙p:/ /www.phpinternalsbook.com/ Julien Pauli Performance guy at
  94. What extensions can do  Extensions can :  Add

    new functions  Add new classes / interfaces  Add and manage php.ini se﬙ings and phpinfo() output  Add new global variables or constants  Add new stream wrappers/filters, new resource ﬚pes  Overwrite what other extensions defined  Extensions cannot :  Modi﬌ PHP syntax  Change the engine executor behavior (zend_extension can)
  95. Why create an extension?  Bundle an external library code

    into PHP  Example h﬙ps:/ /github.com/nicolasff/phpredis  Optimize performances  C is way faster than PHP  Create your own C structures and manage them by providing PHP functions  Create your own resource intensive algorithms  Example : h﬙ps:/ /github.com/phadej/igbinary
  96. C vs PHP  Don't try to turn the world

    to C  Why you should use PHP over C  C is way more difficult to develop than PHP  C is very less maintainable  C can be tricky to debug  Why you should use C over PHP  Bundle an external lib into PHP (cant be done in PHP)  Looking for speed and fast algos  Changing PHP behavior deeply
  97. PHP Objects internals  What you see from PHP land

    is just a "default implementation" in the engine  The ZendEngine 2 (PHP 5) has been designed with a highly extensible object model $o = new MyObject; $o->anAttribute; $o->aMethodCall();
  98. PHP Objects internals  An object is a zend_object 

    A class is a zend_class_entry typedef struct _zend_object { zend_class_entry *ce; HashTable *properties; zval **properties_table; HashTable *guards; /* protects from __get/__set ... recursion */ } zend_object;
  99. PHP Object handlers  Handlers define objects behaviors struct _zend_object_handlers

    { zend_object_add_ref_t add_ref; zend_object_del_ref_t del_ref; zend_object_clone_obj_t clone_obj; zend_object_read_property_t read_property; zend_object_write_property_t write_property; zend_object_read_dimension_t read_dimension; zend_object_write_dimension_t write_dimension; zend_object_has_property_t has_property; zend_object_unset_property_t unset_property; zend_object_has_dimension_t has_dimension; zend_object_unset_dimension_t unset_dimension; zend_object_get_properties_t get_properties; zend_object_get_method_t get_method; zend_object_call_method_t call_method; zend_object_get_constructor_t get_constructor; zend_object_get_class_entry_t get_class_entry; ...
  100. PHP default object handlers  Default handlers exist  They

    define the default PHP behavior you all know  For example, the default "read_dimension" handler  Check's if the object class implements ArrayAccess  Calls for OffsetGet()  Returns what OffsetGet() returned
  101. Changing object handlers  By redefining these handlers, one can

     Directly fetch information instead of calling a PHP function to do so  Create special storage and fetchers for a﬙ributes  Change the way objects are stored and retrieved from the engine  This is what has been done in the C version of Pimple
  102. Experiments https://secure.flickr.com/photos/luzbonita/2352396027

  103. Join the team https://secure.flickr.com/photos/beatkueng/3897711772

  104. !ank y"! https://secure.flickr.com/photos/marfis75/5374308475