-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)StalledTwigBridgeTwigBundle
Description
Description
Maybe I misunderstood some things about TwigRuntime but when I create one I have to do:
- One runtime, with some services injections and a method
doThings
. - One twigExtension with the code:
new TwigFunction('doThings', [MyRuntime::class, 'doThings']),
This create duplicate classes.
Eventually, one thing I can do is to have multiple runtimes, but one single twigExtension calling all of them.
new TwigFunction('doThings', [MyRuntime::class, 'doThings']),
new TwigFunction('doOtherThings', [MyOtherRuntime::class, 'doOtherThings']),
But I was wondering the purpose of this twigExtension in such case and if this couldn't be generated by some config directly:
framework:
twig:
functions:
filters:
tests:
What do you think about such feature ?
derrabus, 94noni, kaznovac and GromNaN
Metadata
Metadata
Assignees
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)StalledTwigBridgeTwigBundle