Fixed deprecation warnings for Twig filters