bug #409 Guess the template earlier (Ener-Getick)
bug #409 Guess the template earlier (Ener-Getick)

This PR was merged into the 3.0.x-dev branch.

Discussion
----------

Guess the template earlier

We have an issue in FOSRestBundle https://github.com/FriendsOfSymfony/FOSRestBundle/issues/1395 since https://github.com/sensiolabs/SensioFrameworkExtraBundle/commit/82b8ad65409c99f693088ecbc09c857f01e3b3fa and https://github.com/FriendsOfSymfony/FOSRestBundle/pull/1355.
So instead of duplicating more logic in FOSRestBundle, IMO the template name should be guessed earlier as it was done before (see [here](https://github.com/sensiolabs/SensioFrameworkExtraBundle/blob/v3.0.12/EventListener/TemplateListener.php#L64)).

Commits
-------

560658c Guess the template earlier

sensiolabs/SensioFrameworkExtraBundle,chalasr/SensioFrameworkExtraBundle,chalasr/SensioFrameworkExtraBundle