search_kit_civicrm_config - Remove redundant registration
authorTim Otten <totten@civicrm.org>
Tue, 1 Nov 2022 09:16:25 +0000 (02:16 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 1 Nov 2022 09:16:25 +0000 (02:16 -0700)
The `SearchKitSubscriber` is now registered as an auto-service. This behaves better when dealing with
various enable/disable flows.

ext/search_kit/search_kit.php

index 54e23a17f61dbfa35ba8dbc1e43e2e902e378a26..c4d20dba3415a0489d062f5fca3495bc4fab77e6 100644 (file)
@@ -11,7 +11,6 @@ use CRM_Search_ExtensionUtil as E;
 function search_kit_civicrm_config(&$config) {
   _search_kit_civix_civicrm_config($config);
   Civi::dispatcher()->addListener('hook_civicrm_alterAngular', ['\Civi\Search\AfformSearchMetadataInjector', 'preprocess'], 1000);
-  Civi::dispatcher()->addSubscriber(new Civi\Api4\Event\Subscriber\SearchKitSubscriber());
 }
 
 /**