Occasional error with search kit installed "call_user_func() expects parameter 1 to be a valid callback, class '\Civi\Search\AfformSearchMetadataInjector' not found"
call_user_func() expects parameter 1 to be a valid callback, class '\Civi\Search\AfformSearchMetadataInjector' not found in line 214 of ...\vendor\symfony\event-dispatcher\EventDispatcher.php.
I haven't traced it, but it seems to be in the upgrade doFinish(), and I assume is related to https://github.com/civicrm/civicrm-core/blob/b7412ea74b71e2c3c457639e301d57147655bd4e/ext/search_kit/search_kit.php#L12:
Civi::dispatcher()->addListener('hook_civicrm_alterAngular', ['\Civi\Search\AfformSearchMetadataInjector', 'preprocess'], 1000);
Possibly some kind of timing issue?
Edited by DaveD