Вызываемая функция должна быть статичной. Сделал так:
class SpammerIBlockElementUpdateHandler
{
public static function runStatic(&$fields)
{
$self = new self();
return $self->run($fields);
}
public function run(&$arFields)
{
//some code
}
}
/*****************************/
$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->registerEventHandlerCompatible(
"iblock",
"OnAfterIBlockElementUpdate",
$this->MODULE_ID,
'\foo_spammer\events\SpammerIBlockElementUpdateHandler',
"runStatic"
);