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 + }