Fix merge conflict resolution

This commit is contained in:
Fabien Potencier
2026-07-30 14:04:07 +02:00
parent 986a765019
commit efd847f456
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ final class MacrosNode extends Node
parent::__construct($macros);
}
public function setNode(string $name, Node $node): void
public function setNode(string|int $name, Node $node): void
{
if (!$node instanceof MacroNode) {
throw new \LogicException(\sprintf('A "%s" can only contain "%s" nodes; replacing the macro "%s" with a "%s" node is not supported.', static::class, MacroNode::class, $name, get_debug_type($node)));
+1 -1
View File
@@ -148,7 +148,7 @@ EOF, 'index')));
$twig = new Environment(new ArrayLoader());
$this->expectException(SyntaxError::class);
$this->expectExceptionMessage('Omitting parentheses when calling a macro is not allowed; add parentheses after the macro name.');
$this->expectExceptionMessage('Omitting parentheses when calling a macro is not allowed; add parentheses after the macro name in "index" at line 1.');
$twig->parse($twig->tokenize(new Source("{% import _self as macros %}{{ $expression }}", 'index')));
}