mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-04 10:57:04 +00:00
Resolve constant parent templates once instead of on every lookup
This commit is contained in:
@@ -232,7 +232,7 @@ class __TwigTemplate_%x extends Template
|
||||
protected function doGetParent(array \$context): bool|string|Template|TemplateWrapper
|
||||
{
|
||||
// line 1
|
||||
return "layout.twig";
|
||||
return \$this->parent ??= \$this->load("layout.twig", 1);
|
||||
}
|
||||
|
||||
protected function doDisplay(array \$context, array \$blocks = []): iterable
|
||||
|
||||
Reference in New Issue
Block a user