Twig now has ``getCallable`` so this is not needed.