Using Twig classes even the twig configuration value is false
Closed this issue · 2 comments
mmoreram commented
By default, twig
value inside configuration is decided by checking if Twig_Environment
class exists. That's great.
The point is that, after that, there is a listener that injects, always, a class that extends Twig_Extension
. This makes that an application without Twig installed cannot use this bundle.
What to do:
- Place the twig related services to another file called twig.yml.
- Only load this file if
twig
is set to true - Because the listener where this extension is loaded accepts a null value, inject a null when the service doesn't exist.
Thoughts?
Nyholm commented
Hey.
Thank you for your suggestions. You should have a look at version 2.0-beta. That is exactly what we have done.