addOption( 'check', 'c', InputOption::VALUE_NONE, 'Only check the reference index of TYPO3' ); } /** * Executes the command for adding or removing the lock file */ protected function execute(InputInterface $input, OutputInterface $output): int { Bootstrap::initializeBackendAuthentication(); $io = new SymfonyStyle($input, $output); $isTestOnly = (bool)$input->getOption('check'); $progressListener = GeneralUtility::makeInstance(ReferenceIndexProgressListener::class); $progressListener->initialize($io); $referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class); if ($isTestOnly) { $io->section('Reference Index being TESTED (nothing written, remove the "--check" argument)'); } else { $io->section('Reference Index is now being updated'); } $referenceIndex->updateIndex($isTestOnly, $progressListener); return Command::SUCCESS; } }