Merge branch '1.x' into 2.x

* 1.x:
  removed one usage of Template vs TemplateWrapper
This commit is contained in:
Fabien Potencier
2019-03-12 11:17:32 +01:00
+2 -2
View File
@@ -449,7 +449,7 @@ class Environment
*
* @param string $template The template name
*
* @return Template A template instance representing the given template name
* @return TemplateWrapper A template instance representing the given template name
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
@@ -465,7 +465,7 @@ class Environment
$this->setLoader($loader);
try {
return $this->loadTemplate($name);
return new TemplateWrapper($this, $this->loadTemplate($name));
} finally {
$this->setLoader($current);
}