diff --git a/src/Command/ProvisionCommand.php b/src/Command/ProvisionCommand.php deleted file mode 100644 index c1d9843..0000000 --- a/src/Command/ProvisionCommand.php +++ /dev/null @@ -1,58 +0,0 @@ -preferencesRepository = $preferencesRepository; - $this->logger = $logger; - $this->kernel = $kernel; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $pipelineInput = new GettingStartedInput( - kernel: $this->kernel, - preferenceRepository: $this->preferencesRepository, - logger: $this->logger, - ); - - $pipeline = (new Pipeline) - ->pipe(new MigrateDatabase) - ->pipe(new AddPreferencesToDatabase); - - $pipeline->process($pipelineInput); - - $io->success('You have a new command! Now make it your own! Pass --help to see your options.'); - - return Command::SUCCESS; - } -} diff --git a/src/User/Framework/Pipeline/GettingStarted/AddPreferencesToDatabase.php b/src/User/Framework/Pipeline/GettingStarted/AddPreferencesToDatabase.php deleted file mode 100644 index 4d2cff4..0000000 --- a/src/User/Framework/Pipeline/GettingStarted/AddPreferencesToDatabase.php +++ /dev/null @@ -1,36 +0,0 @@ -preferenceRepository->count() > 0) { - $input->logger->info('[AddPreferencesToDatabase] > Preferences already exist, skipping...'); - return $input; - } - - $app = new Application($input->kernel); - $app->setAutoExit(false); - - $commandInput = new ArrayInput([ - 'command' => 'doctrine:fixtures:load', - '--no-interaction', - ]); - - $output = new BufferedOutput(); - - $app->run($commandInput, $output); - - return $input; - } -} \ No newline at end of file diff --git a/src/User/Framework/Pipeline/GettingStarted/GettingStartedInput.php b/src/User/Framework/Pipeline/GettingStarted/GettingStartedInput.php deleted file mode 100644 index e8cbd7c..0000000 --- a/src/User/Framework/Pipeline/GettingStarted/GettingStartedInput.php +++ /dev/null @@ -1,16 +0,0 @@ -kernel); - $app->setAutoExit(false); - - $commandInput = new ArrayInput([ - 'command' => 'doctrine:migrations:migrate', - '--no-interaction' => true, - ]); - - $output = new BufferedOutput(); - - $app->run($commandInput, $output); - - $input->logger->info('[MigrateDatabase] > Migrating database...', ['output' => $output->fetch()]); - - return $input; - } -} \ No newline at end of file