setName('core:matomo590-migrate-user-scoped-settings'); $this->setDescription( 'Only needed for Matomo 5.9.0-b1 upgrade. ' . 'Migrates legacy user-scoped settings from option keys to plugin_setting rows and purges legacy option keys.' ); } protected function doExecute(): int { $result = self::migrate(); $this->getOutput()->writeln('Done'); foreach ($result as $key => $value) { $this->getOutput()->writeln(sprintf('%s: %d', $key, $value)); } return self::SUCCESS; } /** * @return array */ public static function migrate(): array { $migration = StaticContainer::get(LegacyUserSettingsMigration::class); return $migration->migrate(); } }