migration = $factory; } public function getMigrations(Updater $updater) { $migrations = []; $config = Config::getInstance(); $general = $config->General; if (empty($general['login_whitelist_apply_to_reporting_api_requests'])) { $migrations[] = $this->migration->config->set('General', 'login_allowlist_apply_to_reporting_api_requests', '0'); } return $migrations; } public function doUpdate(Updater $updater) { $updater->executeMigrations(__FILE__, $this->getMigrations($updater)); $config = Config::getInstance(); $general = $config->General; if (!empty($general['login_whitelist_ip'])) { // the migration->config->set does not support arrays yet so we do it here. $general['login_allowlist_ip'] = $general['login_whitelist_ip']; $config->General = $general; $config->forceSave(); } } }