Skip to content

Commit 0e02179

Browse files
committed
feat: allow unregistering group backends
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 2da5e83 commit 0e02179

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

lib/private/Group/Manager.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ public function addBackend($backend) {
103103
$this->clearCaches();
104104
}
105105

106+
#[\Override]
107+
public function removeBackend(GroupInterface $backend): void {
108+
$this->clearCaches();
109+
if (($i = array_search($backend, $this->backends)) !== false) {
110+
unset($this->backends[$i]);
111+
}
112+
}
113+
106114
#[\Override]
107115
public function clearBackends() {
108116
$this->backends = [];

lib/public/IGroupManager.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public function isBackendUsed($backendClass);
3838
*/
3939
public function addBackend($backend);
4040

41+
/**
42+
* @since 34.0.0
43+
*/
44+
public function removeBackend(GroupInterface $backend): void;
45+
4146
/**
4247
* @since 8.0.0
4348
*/

0 commit comments

Comments
 (0)