mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-02 09:05:10 +00:00
14 lines
483 B
Plaintext
14 lines
483 B
Plaintext
--TEST--
|
|
Defining a macro more than once is deprecated
|
|
--DEPRECATION--
|
|
Since twig/twig 3.29: Defining the macro "greet" more than once in "index.twig" is deprecated and will throw a SyntaxError in Twig 4.0 (previous definition at line 3, new definition at line 4). The last definition is used in Twig 3.
|
|
--TEMPLATE--
|
|
{% import _self as macros %}
|
|
{% macro greet() %}first{% endmacro %}
|
|
{% macro greet() %}second{% endmacro %}
|
|
{{ macros.greet() }}
|
|
--DATA--
|
|
return []
|
|
--EXPECT--
|
|
second
|