2828use Psr \Log \LoggerInterface ;
2929use RuntimeException ;
3030use Stringable ;
31+ use Twig \DeprecatedCallableInfo ;
3132use Twig \Extension \AbstractExtension ;
3233use Twig \TwigFunction ;
3334use Twig \TwigTest ;
3435
36+ use function class_exists ;
3537use function sprintf ;
3638use function trim ;
3739
@@ -57,7 +59,11 @@ public function getFunctions(): array
5759 new TwigFunction ('renderNode ' , $ this ->renderNode (...), ['is_safe ' => ['html ' ], 'needs_context ' => true ]),
5860 new TwigFunction ('renderLink ' , $ this ->renderLink (...), ['is_safe ' => ['html ' ], 'needs_context ' => true ]),
5961 new TwigFunction ('renderBreadcrumb ' , $ this ->renderBreadcrumb (...), ['is_safe ' => ['html ' ], 'needs_context ' => true ]),
60- new TwigFunction ('renderMenu ' , $ this ->renderMenu (...), ['is_safe ' => ['html ' ], 'needs_context ' => true , 'deprecated ' => true ]),
62+ new TwigFunction (
63+ 'renderMenu ' ,
64+ $ this ->renderMenu (...),
65+ ['is_safe ' => ['html ' ], 'needs_context ' => true ] + (class_exists (DeprecatedCallableInfo::class) ? ['deprecation_info ' => new DeprecatedCallableInfo ('phpdocumentor/guides ' , '1.1.0 ' , 'renderMenu" from " ' . GlobalMenuExtension::class)] : ['deprecated ' => true ]),
66+ ),
6167 new TwigFunction ('renderTarget ' , $ this ->renderTarget (...), ['is_safe ' => ['html ' ], 'needs_context ' => true ]),
6268 new TwigFunction ('renderOrderedListType ' , $ this ->renderOrderedListType (...), ['is_safe ' => ['html ' ], 'needs_context ' => false ]),
6369 ];
0 commit comments