diff --git a/Civi/Api4/Service/LegacySpecScanner.php b/Civi/Api4/Service/LegacySpecScanner.php index fcbe35e8f0e6..2177a0074098 100644 --- a/Civi/Api4/Service/LegacySpecScanner.php +++ b/Civi/Api4/Service/LegacySpecScanner.php @@ -26,6 +26,9 @@ class LegacySpecScanner implements AutoServiceInterface { public static function buildContainer(ContainerBuilder $container): void { $classNames = static::findClasses('Civi\Api4\Service\Spec\Provider', $container); foreach ($classNames as $className) { + if (!class_exists($className)) { + continue; + } $class = new \ReflectionClass($className); if ($class->implementsInterface(AutoServiceInterface::class)) { // This is already handled by the main scanner. diff --git a/ext/search_kit/search_kit.php b/ext/search_kit/search_kit.php index 54e23a17f61d..c4d20dba3415 100644 --- a/ext/search_kit/search_kit.php +++ b/ext/search_kit/search_kit.php @@ -11,7 +11,6 @@ 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()); } /**