symfony/symfony — pull request #7479 by maxbeutel (2013-03-26 11:19:39+00:00)
Title: [TwigBundle] Make twig extension handle custom template escaping guesser

I wanted to add a custom template escaping guesser for twig like in http://twig.sensiolabs.org/doc/recipes.html#using-the-template-name-to-set-the-default-escaping-strategy

This pull request allows you register a service id and a method as a custom guesser:

twig:
autoescape: my_service:guess

Documentation is missing for this PR and the unit tests are not that good. I´d work on it if this PR has any chance of getting merged?

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | (missing)