From d5f5cc4c7048eb5d3fedf2c0f599961ea5acba8b Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 25 Feb 2022 19:16:30 -0800 Subject: [PATCH] Civi\Test\HookInterface is now an alias for Civi\Core\HookInterface This means that we don't need to maintain two copies of the docblock. There's a strong expectation that the interfaces work equivalently. It will be more forgiving if a consumer mixes up the names. --- Civi/Core/Event/EventScanner.php | 2 +- Civi/Test/HookInterface.php | 49 +++----------------------------- 2 files changed, 5 insertions(+), 46 deletions(-) diff --git a/Civi/Core/Event/EventScanner.php b/Civi/Core/Event/EventScanner.php index 0dc2f2123c..1a9c93f8f5 100644 --- a/Civi/Core/Event/EventScanner.php +++ b/Civi/Core/Event/EventScanner.php @@ -67,7 +67,7 @@ class EventScanner { $listenerMap = []; // These 2 interfaces do the same thing; one is meant for unit tests and the other for runtime code - if (is_subclass_of($class, '\Civi\Test\HookInterface') || is_subclass_of($class, '\Civi\Core\HookInterface')) { + if (is_subclass_of($class, '\Civi\Core\HookInterface')) { $listenerMap = static::mergeListenerMap($listenerMap, static::findFunctionListeners($class, $self)); } if (is_subclass_of($class, '\Symfony\Component\EventDispatcher\EventSubscriberInterface')) { diff --git a/Civi/Test/HookInterface.php b/Civi/Test/HookInterface.php index 12b0cb7588..4bc4a58060 100644 --- a/Civi/Test/HookInterface.php +++ b/Civi/Test/HookInterface.php @@ -1,47 +1,6 @@