Browse code

Merge branch '1.x' into 2.x

* 1.x:
removed one usage of Template vs TemplateWrapper

Fabien Potencier authored on 12/03/2019 10:17:32
Showing 1 changed files
... ...
@@ -449,7 +449,7 @@ class Environment
449 449
      *
450 450
      * @param string $template The template name
451 451
      *
452
-     * @return Template A template instance representing the given template name
452
+     * @return TemplateWrapper A template instance representing the given template name
453 453
      *
454 454
      * @throws LoaderError When the template cannot be found
455 455
      * @throws SyntaxError When an error occurred during compilation
... ...
@@ -465,7 +465,7 @@ class Environment
465 465
 
466 466
         $this->setLoader($loader);
467 467
         try {
468
-            return $this->loadTemplate($name);
468
+            return new TemplateWrapper($this, $this->loadTemplate($name));
469 469
         } finally {
470 470
             $this->setLoader($current);
471 471
         }