mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-17 21:07:18 +00:00
Fix merge conflict resolution
This commit is contained in:
@@ -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)));
|
||||
|
||||
@@ -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')));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user