Due to #2574969: Add a Views-like UI for adding fields and the parameter converter service introduced there, we now implicitly depend on the User module, which mainly shows in our Kernel tests, which now all need to include the module in their installed modules.
The question is: should we just add that dependency to the search_api.info.yml, to make it explicit? We could then remove it from the tests and if someone hacks Core to a point where they can uninstall the User module, we make it clear that the Search API will stop working then (although it would be pretty easy to fix).
On the other hand, it's a required Core module, so I don't think depending on it is something that's generally done.
(We also implicitly depend on the System module, which is of course even more hard-coded, but still shows in some Kernel tests. So there would be the same question there, I guess – but with the change that it would actually harm performance of some Kernel tests (namely those that don't require the System module to be present).)
Any opinions on this?
Comments
Comment #2
drunken monkeyComment #3
borisson_I'm not sure if there is a guideline about what to do here. If there isn't one, we should probably be as explicit as possible.
Comment #4
drunken monkeyIn Core, the Filter module explicitly depends on User, and User even explicitly depends on System. But other than that, except in a few test modules, the dependency always remains implicit.
I don't think there is really any guideline on it (there rarely is).
Comment #5
borisson_As we saw in #2642728: Move tests away from EntityUnitTestBase?, I think we should be explicit about this.
Comment #6
drunken monkeyJust tested, but the PHP Unit tests don't care about module dependencies, so
'user'still needs to be there. (Obvious, really, coming to think about, since we also needed'system'if'user'was already there, or'search_api'together with'search_api_test_backend'.) So, this would really just be documentation and for the faint possibility that someone, somewhere wants to run Drupal without the User module (and then they'll probably figure out that one problem with Search API quickly enough).In that light, I think I lean more towards a "no" here.
Comment #7
borisson_The explanation in #6 makes sense, let's close this.
Comment #8
drunken monkeyOK.
Comment #9
drunken monkey