From 5f60155fe9a3b0a03909401806e3fba83c5f6076 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 19 Dec 2023 14:11:05 -0800 Subject: [PATCH] event_check - If enabled, then constantly enforce event contracts --- Civi/Test/EventChecker.php | 2 +- tools/extensions/event_check/event_check.php | 25 ++++++++++++-------- tools/extensions/event_check/info.xml | 16 +++++++------ 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/Civi/Test/EventChecker.php b/Civi/Test/EventChecker.php index 1ac6db7fd8..dcadcf8fa9 100644 --- a/Civi/Test/EventChecker.php +++ b/Civi/Test/EventChecker.php @@ -26,7 +26,7 @@ class EventChecker { private $activeChecks = NULL; /** - * @param \PHPUnit\Framework\Test $test + * @param \PHPUnit\Framework\Test|NULL $test * * @return $this */ diff --git a/tools/extensions/event_check/event_check.php b/tools/extensions/event_check/event_check.php index 69d8dbb7dd..76a557a9ab 100644 --- a/tools/extensions/event_check/event_check.php +++ b/tools/extensions/event_check/event_check.php @@ -1,8 +1,7 @@ start(NULL); + $checker->addListeners(); + } + + // _event_check_civix_civicrm_config($config); } /** @@ -18,15 +23,15 @@ function event_check_civicrm_config(&$config, ?array $flags = NULL): void { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install */ -function event_check_civicrm_install(): void { - _event_check_civix_civicrm_install(); -} +// function event_check_civicrm_install(): void { +// _event_check_civix_civicrm_install(); +// } /** * Implements hook_civicrm_enable(). * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function event_check_civicrm_enable(): void { - _event_check_civix_civicrm_enable(); -} +// function event_check_civicrm_enable(): void { +// _event_check_civix_civicrm_enable(); +// } diff --git a/tools/extensions/event_check/info.xml b/tools/extensions/event_check/info.xml index 32a77121fb..a0ec7b71d1 100644 --- a/tools/extensions/event_check/info.xml +++ b/tools/extensions/event_check/info.xml @@ -1,26 +1,26 @@ event_check - event_check - FIXME + Event Check + QA/development tool. Enable strict enforcement of event and hook behaviors. AGPL-3.0 Tim Otten totten@civicrm.org - http://FIXME - http://FIXME - http://FIXME + https://civicrm.org + https://docs.civicrm.org + https://lab.civicrm.org http://www.gnu.org/licenses/agpl-3.0.html 2023-12-19 - 1.0 + 5.70 alpha 5.70 - This is a new, undeveloped module + @@ -30,9 +30,11 @@ 23.02.1 crmEventCheck + -- 2.25.1