removed the possibility to pass a Template to Environment::load()

This commit is contained in:
Fabien Potencier
2019-04-23 18:19:39 +02:00
parent 8966892305
commit 85fc1eff55
-6
View File
@@ -350,12 +350,6 @@ class Environment
return $name;
}
if ($name instanceof Template) {
@trigger_error('Passing a \Twig\Template instance to '.__METHOD__.' is deprecated since Twig 2.7.0, use \Twig\TemplateWrapper instead.', E_USER_DEPRECATED);
return new TemplateWrapper($this, $name);
}
return new TemplateWrapper($this, $this->loadTemplate($this->getTemplateClass($name), $name));
}