Restore void return type compatibility for extension points

This commit is contained in:
Fabien Potencier
2026-08-26 20:51:38 +02:00
parent 885cbdb58f
commit 6bbbb49c3e
15 changed files with 180 additions and 39 deletions
+8 -2
View File
@@ -79,7 +79,10 @@ class IncludeNode extends Node implements NodeOutputInterface, CoercesChildrenTo
}
}
protected function addGetTemplate(Compiler $compiler/* , string $template = '' */): void
/**
* @return void
*/
protected function addGetTemplate(Compiler $compiler/* , string $template = '' */)
{
$compiler
->raw('$this->load(')
@@ -90,7 +93,10 @@ class IncludeNode extends Node implements NodeOutputInterface, CoercesChildrenTo
;
}
protected function addTemplateArguments(Compiler $compiler): void
/**
* @return void
*/
protected function addTemplateArguments(Compiler $compiler)
{
if (!$this->hasNode('variables')) {
$compiler->raw(false === $this->getAttribute('only') ? '$context' : '[]');