From d1b05519afb62b12b8306c6cd25128e134626404 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 10 Sep 2024 08:34:26 +0200 Subject: [PATCH] Clarify docs on registerUndefinedTokenParserCallback() --- doc/recipes.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/recipes.rst b/doc/recipes.rst index c091d34fc..5144f2111 100644 --- a/doc/recipes.rst +++ b/doc/recipes.rst @@ -300,6 +300,14 @@ does not return ``false``. As the resolution of functions/filters/tags is done during compilation, there is no overhead when registering these callbacks. +.. warning:: + + As parsing a tag is specific to each tag (the syntax is free form), the + ``registerUndefinedTokenParserCallback()`` cannot be used to define a + default implementation for all unknown tags. It's mainly useful to override + the default exception or to register on the fly TokenParser instances for + specific known tags. + Validating the Template Syntax ------------------------------