remove deprecated $app->registerHook call