Use all available group services#2972
Conversation
When we just had one implementation of a group service we could just inject the implementation when the interface is used. However, as another implementation was added, it is necessary to explicitly require the implementations to be able to use all of them. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
e6f668f to
858da61
Compare
| public function __construct(IGroupService $groupService) { | ||
| $this->groupServices[] = $groupService; | ||
| public function __construct(ContactsGroupService $contactsGroupService, NextcloudGroupService $nextcloudGroupService) { | ||
| $this->groupServices = [ |
There was a problem hiding this comment.
So we decide on ordering of the services here?
If any service fails nothing is returned in getMatchingGroups, but that is outside the scope of this issue.
There was a problem hiding this comment.
Code looks good.
However, I wanted to do an integration test on the GUI, but I'm not able to install the mail app since composer install fails on requiring kwi/urllinker which seems to be a private repo?
There was a problem hiding this comment.
fails on requiring
kwi/urllinkerwhich seems to be a private repo?
Are you sure it fails? I think that is just a warning. You can perhaps ignore that.
There was a problem hiding this comment.
If any service fails nothing is returned in getMatchingGroups, but that is outside the scope of this issue.
Yes and yes :)
|
/backport to stable1.3 |
|
backport to stable1.3 in #3005 |
When we just had one implementation of a group service we could just
inject the implementation when the interface is used. However, as
another implementation was added, it is necessary to explicitly require
the implementations to be able to use all of them.
Before the patch the contacts group integration overwrote the nextcloud group integration.
Fixes #810
@nextcloud/mail