I recently add the need to use multiple hints for a component definition, however I hesitated to do so because of the warning we currently have in the documentation: https://extensions.xwiki.org/xwiki/bin/view/Extension/Component%20Module#HRegisteringaComponentwithseveralHints
While this feature is still valid in 3.1+, in the future we’ll either drop this feature (since there are workarounds) or we’ll add the ability to specify several @Named annotations. We recommend to not start depending on this feature as much as possible to prevent future incompatibilities.
Now when I asked about it in the chat @tmortagne indicated that:
The thing with @Named is that it’s actually not on our side AFAIR, I think we checked and that it’s simply not defined to allow being used multiple times. That warning was probably a bit premature.
Knowing that it’s a valid usecase to have multiple hints in component (even if not the most common one), and that we do allow that construct for a long time, meaning that we’ll have to preserve the backward compatibility anyway. I propose that we just drop the warning from our documentation.