This is not needed. You can use the [``template_from_string`` function](http://twig.sensiolabs.org/doc/functions/template_from_string.html)