deprecated Twig_Template::getEnvironment()

This commit is contained in:
Fabien Potencier
2015-08-12 11:28:53 +02:00
parent 1eb5fb26ef
commit c9501b80a1
3 changed files with 8 additions and 1 deletions
+1
View File
@@ -1,5 +1,6 @@
* 1.20.0 (2015-XX-XX)
* deprecated Twig_Template::getEnvironment()
* deprecated the _self variable for usage outside of the from and import tags
* added Twig_BaseNodeVisitor to ease the compatibility of node visitors
between 1.x and 2.x
+4
View File
@@ -130,3 +130,7 @@ Miscellaneous
* As of Twig 1.x, ``Twig_Environment::clearTemplateCache()`` is deprecated and
will be removed in 2.0.
* As of Twig 1.x, ``Twig_Template::getEnvironment()`` and
``Twig_TemplateInterface::getEnvironment()`` are deprecated and will be
removed in 2.0.
+3 -1
View File
@@ -45,10 +45,12 @@ abstract class Twig_Template implements Twig_TemplateInterface
abstract public function getTemplateName();
/**
* {@inheritdoc}
* @deprecated since 1.20 (to be removed in 2.0)
*/
public function getEnvironment()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.20 and will be removed in 2.0.', E_USER_DEPRECATED);
return $this->env;
}