From ee7be2e18721fa158658a429b6df83ed414da6db Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Jun 2019 10:04:49 +0200 Subject: [PATCH] added a doc note --- doc/tags/macro.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/tags/macro.rst b/doc/tags/macro.rst index 4d79f2f8ab..33808f5a8f 100644 --- a/doc/tags/macro.rst +++ b/doc/tags/macro.rst @@ -138,6 +138,12 @@ When calling ``import`` or ``from`` from a ``macro`` tag, the imported macros are only defined in the current macro and they override macros defined at the template level with the same names. +.. note:: + + Before Twig 2.11, it was possible to use macros imported in a block in a + "sub-block". When upgrading to 2.11, you need to either move the import in + the global scope or reimport the macros explicitly in the "sub-blocks". + Checking if a Macro is defined ------------------------------