Implement a MenuBuilderProviderInterface to support autoconfiguration
This interface allows defining the menu names from the class itself instead of having to define them in the service definition. This is similar to the event subscriber vs event listener system in Symfony. The benefit of this interface is that the service definition can rely on autoconfiguration to register everything, which fits very well with the Flex way.
TODOs:
- [ ] write tests
@stof did you make any progress with tests here? Do you need some help with it?
No progress, because I totally forgot that PR.
hoping this PR will get merged and a new release is on the horizon 🌤
Ehi @stof, sometimes I come back here to bother you about possible finalization of this old PR 😉 Any news?
Rather than this MenuBuilderProviderInterface providing a static method returning a map of menu name to builder methods, I think a AsMenuBuilder attribute applied on methods will be better (and Symfony 5 supports that for autoconfiguration)