upgradeWizardsService = $this->bootService ->loadExtLocalconfDatabase(false, false) ->get(UpgradeWizardsService::class); Bootstrap::initializeBackendAuthentication(); } /** * Configure the command by defining the name, options and arguments */ protected function configure(): void { $this->setDescription('Mark upgrade wizard as undone.') ->addArgument( 'wizardIdentifier', InputArgument::REQUIRED ); } /** * Mark an upgrade wizard as undone */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); $this->bootstrap(); $wizardIdentifier = (string)$input->getArgument('wizardIdentifier'); $wizardInformation = $this->upgradeWizardsService->getWizardInformationByIdentifier($wizardIdentifier); $hasBeenMarkedUndone = $this->upgradeWizardsService->markWizardUndone($wizardIdentifier); if ($hasBeenMarkedUndone) { $io->success('The wizard "' . $wizardInformation['title'] . '" has been marked as undone.'); return Command::SUCCESS; } $io->error('The wizard "' . $wizardInformation['title'] . '" could not be marked undone, because it was most likely not yet run.'); return Command::FAILURE; } }