Is it possible to use Twig in Silex from Symfony2 project instead from the standalone bundle?
I already have Symfony integrated as submodule, so is it still necessary to use Twig alongside symfony in the vendor dir?
That would save me one submodule, i mean its no problem thou, i am just curious.
It would be great if i just would have to change the *twig.class_path* to some dir in symfony.
$app->register(new Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__.'/../views',
'twig.class_path' => __DIR__.'/../vendor/twig/lib',
));
I am a bit lost in symfony, there is some Twig in Bridges and some in Bundle, but first i need to know if its possible at all.
No, that is not possible.
There are following libraries in existence:
As you can see, twig is not included with the Symfony2 core. It is an external dependency, that you have to tie in to Symfony2, and you also have to tie into silex.