2 declare(strict_types = 1);
19 use Symfony\Component\Console\Command\Command;
20 use Symfony\Component\Console\Input\InputInterface;
21 use Symfony\Component\Console\Input\InputOption;
22 use Symfony\Component\Console\Output\OutputInterface;
23 use Symfony\Component\Console\Style\SymfonyStyle;
71 $this->setDescription(
'List available upgrade wizards.')
75 InputOption::VALUE_NONE,
76 'Include wizards already done.'
96 $all =
$input->getOption(
'all');
97 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'ext/install'][
'update'] as $identifier => $wizardToExecute) {
98 $upgradeWizard = $this->
getWizard($wizardToExecute, $identifier, (
bool)$all);
99 if ($upgradeWizard !==
null) {
101 'identifier' => $upgradeWizard->getIdentifier(),
102 'title' => $upgradeWizard->getTitle(),
103 'description' => wordwrap($upgradeWizard->getDescription()),
106 $wizardInfo[
'status'] = $this->upgradeWizardsService->isWizardDone($identifier) ?
'DONE' :
'AVAILABLE';
108 $wizards[] = $wizardInfo;
111 if (empty($wizards)) {
112 $this->output->success(
'No wizards available.');
115 $this->output->table([
'Identifier',
'Title',
'Description',
'Status'], $wizards);
117 $this->output->table([
'Identifier',
'Title',
'Description'], $wizards);
135 if (!$all && $this->upgradeWizardsService->isWizardDone($identifier)) {
139 $wizardInstance = GeneralUtility::makeInstance($className);
141 $wizardInstance->setOutput($this->output);
148 return !$all ? $wizardInstance->updateNecessary() ? $wizardInstance : null : $wizardInstance;