upgradeWizardsService = new UpgradeWizardsService(); } /** * @return string */ public function getTitle(): string { return 'Database Up-to-Date'; } /** */ public function ensure(): bool { $adds = $this->upgradeWizardsService->getBlockingDatabaseAdds(); $result = null; if (count($adds) > 0) { $this->output->writeln('Performing ' . count($adds) . ' database operations.'); $result = $this->upgradeWizardsService->addMissingTablesAndFields(); } return $result === null; } /** * @return bool */ public function isFulfilled(): bool { $adds = $this->upgradeWizardsService->getBlockingDatabaseAdds(); return count($adds) === 0; } /** * @param OutputInterface $output */ public function setOutput(OutputInterface $output): void { $this->output = $output; } }