summaryrefslogtreecommitdiff
path: root/inc/lib/Twig/Filter
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2019-02-26 10:11:12 +1000
committerBenjamin Southall <applemansigloo@gmail.com>2019-02-26 10:11:12 +1000
commitf79395851b044689567e0e6c9504acbcaa742782 (patch)
treeee539aee9ffa90e8accd6f130b30a8ebed7a232e /inc/lib/Twig/Filter
parent28f32baf0125ca5085266e73dc5071e5814d8e3b (diff)
Twig update to latest Twig 1.x legacy as per vichan
Diffstat (limited to 'inc/lib/Twig/Filter')
-rw-r--r--inc/lib/Twig/Filter/Function.php5
-rw-r--r--inc/lib/Twig/Filter/Method.php7
-rw-r--r--inc/lib/Twig/Filter/Node.php5
3 files changed, 13 insertions, 4 deletions
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 <fabien@symfony.com>
+ *
* @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 <fabien@symfony.com>
+ *
* @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 <fabien@symfony.com>
+ *
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Node extends Twig_Filter