Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Twig 1.9M downloads

Slide 5

Slide 5 text

1.7M downloads

Slide 6

Slide 6 text

~22M downloads

Slide 7

Slide 7 text

Console Event Dispatcher Finder HTTP Foundation HTTP Kernel Yaml Process Routing Translation Dom Crawler Filesystem CSS Selector Browser Kit ICU Debug

Slide 8

Slide 8 text

easybook Sulu CMF

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

h﬙p:/ /symfony.com/components

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

h﬙p:/ /symfony.com/projects

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

symfony.com https://secure.flickr.com/photos/mmoosa/3501992313

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

h﬙p:/ /symfony.com/roadmap

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

DD4E C589 15FF 888A 8A3D D898 EB8A A69A 566C 0795 http://fabien.potencier.org/about

Slide 21

Slide 21 text

$ git show --show-signature v2.2.11 tag v2.2.11 Tagger: Fabien Potencier 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 Date: Mon Dec 2 08:14:10 2013 +0100 updated VERSION for 2.2.11

Slide 22

Slide 22 text

$ git tag -v v2.2.11 object 6a9c223b066a2553b8f59fd26f84ea630eff403c type commit tag v2.2.11 tagger Fabien Potencier 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) " gpg: aka "Fabien Potencier (fabpot)

Slide 23

Slide 23 text

fabpot’s tools https://secure.flickr.com/photos/craigwalkowicz/4599433039

Slide 24

Slide 24 text

Nov 2010

Slide 25

Slide 25 text

$ gh merge 1234

Slide 26

Slide 26 text

Working on symfony/symfony (branch master) Merging Pull Request 9196: fabpot:table-compact Category (feature, bug, minor)?

Slide 27

Slide 27 text

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)

Slide 28

Slide 28 text

git log --grep="bug *#" --merges --format="%s" \ v2.2.10...v2.2.11

Slide 29

Slide 29 text

commit b00289a6d0472f09b44d6aa0cb2411c36453ee31 Merge: f2b60e9 ea91533 Author: Fabien Potencier 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`

Slide 30

Slide 30 text

2.3 2.4 2.5-dev bug fixes

Slide 31

Slide 31 text

2.3 2.4 2.5-dev new features

Slide 32

Slide 32 text

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.

Slide 33

Slide 33 text

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.

Slide 34

Slide 34 text

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.

Slide 35

Slide 35 text

gh merge 1234 This PR was merged into the 2.5-dev branch. gh merge 1234 This PR was merged into the master branch.

Slide 36

Slide 36 text

git fetch origin refs/notes/*:refs/notes/* fetch = +refs/notes/*:refs/notes/*

Slide 37

Slide 37 text

git log -1 --show-notes=github-comments 5bd18c0 commit 5bd18c01a3c20ddd3710b798b33317ca709cb826 Merge: 04d767d da9bee0 Author: Fabien Potencier 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:

Slide 38

Slide 38 text

$ gh move symfony/Console#1234

Slide 39

Slide 39 text

$ gh label --new --issues

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

https://gist.github.com/fabpot/7887553

Slide 44

Slide 44 text

Coding Standards Madness

Slide 45

Slide 45 text

Coding Standards Madness Typos Madness

Slide 46

Slide 46 text

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

Slide 47

Slide 47 text

common ﬚po fix CS fix

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

Blogs at symfony.es Writes a week of Symfony - 2007 Published a book on Symfony2 organizes Javier Eguiluz Evangelist at

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

4 5 3 2 1 Five random ideas to improve Symfony

Slide 54

Slide 54 text

4 5 3 2 1 Five random ideas to improve Symfony

Slide 55

Slide 55 text

The Symfony download experience

Slide 56

Slide 56 text

The Symfony download experience

Slide 57

Slide 57 text

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

Slide 58

Slide 58 text

The new Symfony experience Contributors Community Bundles Blog Download

Slide 59

Slide 59 text

The new Symfony experience Contributors Community Bundles Blog Download

Slide 60

Slide 60 text

4 5 3 2 1 Five random ideas to improve Symfony

Slide 61

Slide 61 text

The symfony-devs mailing list

Slide 62

Slide 62 text

4 5 3 2 1 Five random ideas to improve Symfony

Slide 63

Slide 63 text

Do you regularly visit the official Symfony blog?

Slide 64

Slide 64 text

Do you regularly visit the official Twig blog?

Slide 65

Slide 65 text

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

Slide 66

Slide 66 text

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

Slide 67

Slide 67 text

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

Slide 68

Slide 68 text

4 5 3 2 1 Five random ideas to improve Symfony

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

The French Community afsy.fr/ avent/2013 sfPot Paris / Marseille

Slide 71

Slide 71 text

The Spanish Community deSymfony 2013 Madrid

Slide 72

Slide 72 text

The German Community Hamburg Cologne Berlin Munich

Slide 73

Slide 73 text

Symfony Camp UA 2013 Symfony Tunisia 2013 Symfony Day Italy 2013 November Camp Sweden

Slide 74

Slide 74 text

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

Slide 75

Slide 75 text

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

Slide 76

Slide 76 text

4 5 3 2 1 Five random ideas to improve Symfony

Slide 77

Slide 77 text

+2,200 bundles

Slide 78

Slide 78 text

8 CAPTCHA There are bundles for

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

please share your ideas to improve Symfony

Slide 81

Slide 81 text

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

Slide 82

Slide 82 text

Twig C extension foo.bar

Slide 83

Slide 83 text

Pimple 2.0

Slide 84

Slide 84 text

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

Slide 85

Slide 85 text

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

Slide 86

Slide 86 text

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

Slide 87

Slide 87 text

https://secure.flickr.com/photos/haniamir/1810369486

Slide 88

Slide 88 text

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

Slide 89

Slide 89 text

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

Slide 90

Slide 90 text

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

Slide 91

Slide 91 text

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

Slide 92

Slide 92 text

Pimple 2.0 C version

Slide 93

Slide 93 text

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

Slide 94

Slide 94 text

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)

Slide 95

Slide 95 text

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

Slide 96

Slide 96 text

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

Slide 97

Slide 97 text

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();

Slide 98

Slide 98 text

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;

Slide 99

Slide 99 text

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

Slide 100

Slide 100 text

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

Slide 101

Slide 101 text

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

Slide 102

Slide 102 text

Experiments https://secure.flickr.com/photos/luzbonita/2352396027

Slide 103

Slide 103 text

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

Slide 104

Slide 104 text

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