From: demeritcowboy Date: Wed, 24 May 2023 22:36:21 +0000 (-0400) Subject: add deprecation warning X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7818ccc98bccfddfbe6796947ad592b8710b722c;p=civicrm-core.git add deprecation warning --- diff --git a/Civi/Core/CiviEventDispatcher.php b/Civi/Core/CiviEventDispatcher.php index 2ddb8634c0..a1ef3329a0 100644 --- a/Civi/Core/CiviEventDispatcher.php +++ b/Civi/Core/CiviEventDispatcher.php @@ -253,6 +253,9 @@ class CiviEventDispatcher implements CiviEventDispatcherInterface { } } + if (is_a($event, '\\Symfony\\Component\\EventDispatcher\\Event')) { + \CRM_Core_Error::deprecatedWarning('\\Symfony\\Component\\EventDispatcher\\Event is deprecated. Consider using \\Civi\\Core\\Event\\GenericHookEvent. For more information see ' . \CRM_Utils_System::docURL2('dev/hooks/usage/symfony/#events', TRUE)); + } $this->bindPatterns($eventName); if ($event === NULL) { $event = GenericHookEvent::create([]);