February 07, 2013

Symfony Components for Drupal

I’ve been lucky enough to be invited to give a talk at DrupalCon Sydney about Symfony Components. So here are the slides and some extended examples for those interested.

The following is an example which demonstrates how the Symfony HTTP Kernel, HTTP Foundation, Routing and Twig Components can be used to build a very simple application.

The commands noted in the discussion download, unpack and then run the example application.

Please note: these commands may need to be adjusted depending on your setup. Also PHP testing server is only available for PHP 5.4.

$ curl https://gist.github.com/pierswarmers/4712678/download > app.tar.gz | tar -zx
$ cd gist4712678-*
$ curl -s https://getcomposer.org/installer | php
$ php ./composer.phar install
$ php -S localhost:8000

Check it out: http://localhost:8000/app.php/say/hello/DrupalCon

And the code for browsing pleasure…