Example #1
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->container = $this->getApplication()->getContainer();
     $this->container->setParameter('update.config', []);
     $this->IOHelper = $ioService = new IOHelper($input, $output, $this->getHelper('question'));
     if (!is_dir(UPDATE_FILES_PATH) && !is_dir(UPDATE_ASSET_PATH)) {
         $ioService->writeln("No update files found.");
         return 1;
     }
     $version = $this->container->get('shopware.version');
     if ($ioService->isInteractive()) {
         $ioService->cls();
         $ioService->printBanner();
         $ioService->writeln("<info>Welcome to the Shopware updater </info>");
         $ioService->writeln(sprintf("Shopware Version %s", $version));
         $ioService->writeln("");
         $ioService->ask('Press return to start the update.');
         $ioService->cls();
     }
     $this->unpackFiles();
     $this->migrateDatabase();
     $this->importSnippets();
     $this->cleanup();
     $this->synchronizeThemes();
     $this->writeLockFile();
     $ioService->cls();
     $ioService->writeln("");
     $ioService->writeln("");
     $ioService->writeln("<info>The update has been finished succesfuly.</info>");
     $ioService->writeln("Your shop is currently in maintenance mode.");
     $ioService->writeln(sprintf("Please delete <question>%s</question> to finish the update.", UPDATE_ASSET_PATH));
     $ioService->writeln("");
 }
Example #2
0
 /**
  * @param IOHelper $ioService
  */
 private function printStartMessage(IOHelper $ioService)
 {
     $version = $this->container->offsetGet('shopware.version');
     $ioService->cls();
     $ioService->printBanner();
     $ioService->writeln(sprintf("<info>Welcome to the Shopware %s installer</info>", $version));
     $ioService->writeln("");
     $ioService->ask(new Question('Press return to start installation.'));
     $ioService->cls();
 }