I see that the Twig_Loader_String class has been deprecated and will be removed in Twig 2.0. Also, the comments in the source indicate that it should \"NEVE
Twig_Loader_String
$tplName = uniqid( 'string_template_', true ); $env = clone $this->getTwig(); $env->setCache(false); $env->setLoader( new \Twig_Loader_Array( [ $tplName => 'Hello, {{ name }}' ] )); $html = new Response( $env->render( $tplName, [ 'name' => 'Bob' ] )); echo $html; // Hello, Bob