Replace deprecated Twig features