Open Gemineye opened 6 years ago
We cannot easily avoid this deprecation warning without breaking support for bundle inheritance. I don't have an idea yet to avoid triggering it in case inheritance is not used (I'm not even sure it is possible).
Our code is already compatible with newer versions not supporting this attribute though.
I was getting the same depreciation notice in 3.4 and was able to get rid of it. I was calling the menus in views using the following:
{{ knp_menu_render('AppBundle:Builder:dashboardAccountMenu', {'template': ':menu:menu.html.twig'}) }}
The Builder class was not registered as a Service. Following the documentation I registered MenuBuilder as a Service:
Creating Menu Builders as Services
And now calling menus as following (using menu alias):
{{ knp_menu_render('dashboard_account_menu', {'template': ':menu:menu.html.twig'}) }}
Hope this can help someone.
I see this Message after rendering a menu:
User Deprecated: Passing "false" as the second argument to Symfony\Component\HttpKernel\Kernel::getBundle() is deprecated as of 3.4 and will be removed in 4.0.