KnpMenuBundle icon indicating copy to clipboard operation
KnpMenuBundle copied to clipboard

support Symfony 7, bump minimum PHP to 8.1

Open tacman opened this issue 2 years ago • 4 comments

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.

tacman avatar Oct 10 '23 13:10 tacman

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.

garak avatar Oct 10 '23 15:10 garak

Note that adding return types in non-final classes requires a major version as it is a breaking change.

stof avatar Oct 10 '23 15:10 stof

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

tacman avatar Oct 11 '23 11:10 tacman

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.

tacman avatar Oct 24 '23 10:10 tacman

#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.

ccandreva avatar Mar 28 '24 18:03 ccandreva