KnpMenuBundle
KnpMenuBundle copied to clipboard
support Symfony 7, bump minimum PHP to 8.1
Symfony 7 will be out at the end of next month.
What do you think of creating a new version for Symfony ^6.3 || ^7? Version 4 of this bundle could then extend AbstractBundle and benefit from the easier bundle configuration introduced in Symfony 6.1.
And add return types and the other benefits that come with bumping the minimum PHP to 8.1.
It's a good idea, but at this point I would prefer ^6.4 | ^7.0.
Anyway, Symfony 7 needs to be supported in KnpMenu library before.
Note that adding return types in non-final classes requires a major version as it is a breaking change.
brainstorming: If the next version of the bundle is 6.4||7.0, what about adding a dependency on twig-components, and simplifying the knp_menu.html.twig macros and replacing them with components?
In particular, array manipulation in twig is awkward, so merging the right classes is verbose. If the key blocks were components, that manipulation could be done in PHP.
<twig:menuLabel ...attribututes />
I brought this up on the Symfony discussion board: https://github.com/symfony/symfony/discussions/51755
knp menu now supports Symfony 7 (which is in beta).
I'm happy to test, and to add return types and that kind of stuff if you decide to go with a 2.0 branch for 6.4/^7.
#467 Seems to allow Symfony 7, where does this Issue stand then ? I'm trying to use this bundle in a Symfony 7 project following the docs and am not having positive results.