From 5a28cef6378a7f4bb232ce1ac9657ba9ef84a330 Mon Sep 17 00:00:00 2001 From: Thibault Junin Date: Sat, 18 Jan 2020 22:01:39 +0000 Subject: [PATCH] Updated to Twig 3.0 --- src/i18nTwigExtension.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18nTwigExtension.php b/src/i18nTwigExtension.php index ea7676e..6361f30 100644 --- a/src/i18nTwigExtension.php +++ b/src/i18nTwigExtension.php @@ -5,7 +5,7 @@ use Twig\Extension\AbstractExtension; use Twig\TwigFilter; - class i18nTwigExtension extends \Twig_Extension + class i18nTwigExtension extends \Twig\Extension\AbstractExtension { private $i18n; @@ -17,7 +17,7 @@ public function __construct(i18n $i18n){ public function getFunctions() { return array( - new \Twig_SimpleFunction('i18n', [$this, 'i18n']), + new \Twig\TwigFunction('i18n', [$this, 'i18n']), ); } @@ -31,4 +31,4 @@ public function i18n($word) return "i18n.error ($word)"; } } - } \ No newline at end of file + }