Skip to content
Snippets Groups Projects
Commit f6718cd0 authored by nicxvan's avatar nicxvan
Browse files

Handle removeHook legacyimplentationsmap

parent c8130de8
Branches
Tags
No related merge requests found
......@@ -129,8 +129,13 @@ public function process(ContainerBuilder $container): array {
// discovered.
foreach ($processAfter[RemoveHook::class] as $removeHook) {
if ($module = ($moduleFinder[$removeHook->class][$removeHook->method] ?? '')) {
unset($legacyImplementationMap[$removeHook->hook][$module]);
unset($implementations[$removeHook->hook][$module][$removeHook->class][$removeHook->method]);
// A module can implement a hook more than one time so confirm no
// more implementations before removing from the
// $legacyImplementationMap.
if (!isset($implementations[$removeHook->hook][$module])) {
unset($legacyImplementationMap[$removeHook->hook][$module]);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment