Refactor TwigExtension to work with TwigBridge 0.6