Closed robertpustulka closed 3 years ago
Maybe the instances should be cached based on the config? The environment config array can have a hash generated and be stored with that key.
Can you give an example of a difference in the environment?
@othercorey sorry for the late response. I have different twig based views for a UI and for mailers in my app. Eventually I figured out how to use the same twig instance for both, so for my use case the issue is "resolved" :).
Is there any reason the
Twig\Environment
is a static property in the TwigView?This creates an issue where for example we have differently configured environments for an app view and a mailer view. Once the environment for an app view is set up it is then reused in a mailer view even if the environment config is different.