I am currently in the process of refactoring and restructuring an existing Symfony 2 application.
There are a few base templates and all other templates inherit from them. Right now, all the templates are PHP. I am planning to migrate the application to TWIG.
The problem is that this application is already in use and while migrating I am also expected to add new features to the application. This means I can not freeze the current state of the application, fully migrate to TWIG and then continue working with that.
This means that a migration to TWIG is only possible in small steps, i.e. I can only migrate a handful of templates before I have to deploy a new release. There will also be some new templates for the features I am adding and I would also prefer to add these in TWIG format.
My plan right now is to migrate the base templates to TWIG first and then include the existing PHP templates in those new base templates. Afterwards, I would continue migrating the other templates in small batches.
Looking at documentation online, it is possible to have both the PHP and TWIG template engines enabled simultaneously. However, I could not find any tutorials, examples or documentation mentioning that you could not only have those two engines side by side but also have templates from one engine include templates from the other engine.
Is there a way to mix templates from those two engines as I described?