sensio/SensioFrameworkExtraBundle — Issue #102: Template annotation documentation missing .format.engine suffix?
Author: brentc
Created: 2012-03-05 00:57:52+00:00
State: open

[The documentation](https://github.com/sensio/SensioFrameworkExtraBundle/blob/master/Resources/doc/annotations/view.rst) for the `@Template` annotation show using a logical name without .format.engine suffix,

```
/**
* @Template("SensioBlogBundle:Post:show")
*/
```

When trying to use a logical name in this format, I get an "Unable to find template" InvalidArgumentException.

From what I can tell in reading [TemplateNameParser](https://github.com/symfony/symfony/blob/4316595dbb7be9dcf2156d090d52f23f11b1ea90/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php#L65), the `parse()` method only knows how to handle logical names _with_ the .format.engine suffix. So [FilesystemLoader](https://github.com/symfony/symfony/blob/4316595dbb7be9dcf2156d090d52f23f11b1ea90/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php#L75) tries to use standard Twig template location (which obviously wont handle Symfony-style logical names).

Should the documentation show the .format.engine suffix, or is there something wrong with my setup that is causing this shortened logical name syntax to throw an "Unable to find template" InvalidArgumentException?