sensio/SensioFrameworkExtraBundle — pull request #184 by WouterJ (2012-12-30 21:00:15+00:00)
Title: Added possibility to set engine in the configuration

Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: make it configurable per bundle, to remove the BC break (?)
License of the code: MIT
Documentation PR: -

This PR will add the possibility to configure the default templating engine in the configuration file by using the `sensio_framework_extra.view.engine` option.

If the engine set in the annotation (`@Template(engine="php")`), this value will be used.

I'm not sure if this is mergable, because it will break the BC. If a user sets the default engine to something different than `Twig`, the third-party bundles get problems because they don't expect this to happen. They need to include `engine="twig"` everywhere and that is just what this PR tries to minimalize.

One solution to avoid the BC break is to configure the bundles for which the default engine get changed, for instance:

sensio_framework_extra:
view:
engine:
php: [AcmeDemoBundle, MyBundleThatUsesPhpAsADefaultBundle]