step 8 of http://fabien.potencier.org/article/58/create-your-own-framework-on-top-of-the-symfony2-components-part-9