mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-05 11:27:26 +00:00
Clarify duplicate macro deprecation message
This commit is contained in:
+1
-1
@@ -313,7 +313,7 @@ class Parser
|
||||
public function setMacro(string $name, MacroNode $node): void
|
||||
{
|
||||
if (isset($this->macros[$name])) {
|
||||
trigger_deprecation('twig/twig', '3.29', 'Defining the macro "%s" more than once in "%s" is deprecated and will throw a SyntaxError in Twig 4.0 (first definition at line %d, second at line %d).', $name, $this->stream->getSourceContext()->getName(), $this->macros[$name]->getTemplateLine(), $node->getTemplateLine());
|
||||
trigger_deprecation('twig/twig', '3.29', 'Defining the macro "%s" more than once in "%s" is deprecated and will throw a SyntaxError in Twig 4.0 (first definition at line %d, second at line %d). The last definition is used in Twig 3.', $name, $this->stream->getSourceContext()->getName(), $this->macros[$name]->getTemplateLine(), $node->getTemplateLine());
|
||||
}
|
||||
|
||||
$this->macros[$name] = $node;
|
||||
|
||||
Reference in New Issue
Block a user