FriendsOfSymfony/FOSRestBundle — Issue #157: "engine" parameter of the View annotation is ignored
Author: arnaud-lb
Created: 2011-12-12 10:34:55+00:00
State: open

It seems that setting the engine parameter of the View annotation has not effect:

`@View(engine="haml")`

Result:

`Unable to find template "FooBundle:Default:index.html.twig". `

FOSRestBundle expects FrameworkExtraBundle to guess the template name and engine. However, in the ViewResponseListener, the 'engine' parameter of the TemplateReference created by FrameworkExtraBundle is set to null:

https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/EventListener/ViewResponseListener.php#L115

Removing this line seems to fix the problem. Am I doing something wrong ? Is this the correct way to change the templating engine ?