From f79395851b044689567e0e6c9504acbcaa742782 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Tue, 26 Feb 2019 10:11:12 +1000 Subject: Twig update to latest Twig 1.x legacy as per vichan --- inc/lib/Twig/Filter/Function.php | 5 ++++- inc/lib/Twig/Filter/Method.php | 7 +++++-- inc/lib/Twig/Filter/Node.php | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'inc/lib/Twig/Filter') diff --git a/inc/lib/Twig/Filter/Function.php b/inc/lib/Twig/Filter/Function.php index ad374a55..71b16554 100644 --- a/inc/lib/Twig/Filter/Function.php +++ b/inc/lib/Twig/Filter/Function.php @@ -3,18 +3,21 @@ /* * This file is part of Twig. * - * (c) 2009 Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +@trigger_error('The Twig_Filter_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.', E_USER_DEPRECATED); + /** * Represents a function template filter. * * Use Twig_SimpleFilter instead. * * @author Fabien Potencier + * * @deprecated since 1.12 (to be removed in 2.0) */ class Twig_Filter_Function extends Twig_Filter diff --git a/inc/lib/Twig/Filter/Method.php b/inc/lib/Twig/Filter/Method.php index 63c8c3be..1b75676c 100644 --- a/inc/lib/Twig/Filter/Method.php +++ b/inc/lib/Twig/Filter/Method.php @@ -3,18 +3,21 @@ /* * This file is part of Twig. * - * (c) 2009 Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +@trigger_error('The Twig_Filter_Method class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.', E_USER_DEPRECATED); + /** * Represents a method template filter. * * Use Twig_SimpleFilter instead. * * @author Fabien Potencier + * * @deprecated since 1.12 (to be removed in 2.0) */ class Twig_Filter_Method extends Twig_Filter @@ -34,6 +37,6 @@ class Twig_Filter_Method extends Twig_Filter public function compile() { - return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension->getName(), $this->method); + return sprintf('$this->env->getExtension(\'%s\')->%s', get_class($this->extension), $this->method); } } diff --git a/inc/lib/Twig/Filter/Node.php b/inc/lib/Twig/Filter/Node.php index 8744c5e0..3e6b12ef 100644 --- a/inc/lib/Twig/Filter/Node.php +++ b/inc/lib/Twig/Filter/Node.php @@ -3,18 +3,21 @@ /* * This file is part of Twig. * - * (c) 2011 Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +@trigger_error('The Twig_Filter_Node class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.', E_USER_DEPRECATED); + /** * Represents a template filter as a node. * * Use Twig_SimpleFilter instead. * * @author Fabien Potencier + * * @deprecated since 1.12 (to be removed in 2.0) */ class Twig_Filter_Node extends Twig_Filter -- cgit v1.3