X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FDatabase%2FDumpCommand.php;fp=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FDatabase%2FDumpCommand.php;h=9de8ad864332e068c94e10b8daa5baadfaf1df42;hp=b867b517b5c8c86c99b36d5de412e3652c043310;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/drupal/console/src/Command/Database/DumpCommand.php b/vendor/drupal/console/src/Command/Database/DumpCommand.php index b867b517b..9de8ad864 100644 --- a/vendor/drupal/console/src/Command/Database/DumpCommand.php +++ b/vendor/drupal/console/src/Command/Database/DumpCommand.php @@ -11,15 +11,12 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Command\Command; -use Drupal\Console\Core\Command\Shared\CommandTrait; +use Drupal\Console\Core\Command\Command; use Drupal\Console\Command\Shared\ConnectTrait; use Drupal\Console\Core\Utils\ShellProcess; -use Drupal\Console\Core\Style\DrupalStyle; class DumpCommand extends Command { - use CommandTrait; use ConnectTrait; @@ -70,7 +67,8 @@ class DumpCommand extends Command InputOption::VALUE_NONE, $this->trans('commands.database.dump.options.gz') ) - ->setHelp($this->trans('commands.database.dump.help')); + ->setHelp($this->trans('commands.database.dump.help')) + ->setAliases(['dbdu']); } /** @@ -78,14 +76,12 @@ class DumpCommand extends Command */ protected function execute(InputInterface $input, OutputInterface $output) { - $io = new DrupalStyle($input, $output); - $database = $input->getArgument('database'); $file = $input->getOption('file'); $learning = $input->getOption('learning'); $gz = $input->getOption('gz'); - $databaseConnection = $this->resolveConnection($io, $database); + $databaseConnection = $this->resolveConnection($database); if (!$file) { $date = new \DateTime(); @@ -93,7 +89,7 @@ class DumpCommand extends Command '%s/%s-%s.sql', $this->appRoot, $databaseConnection['database'], - $date->format('Y-m-d-h-i-s') + $date->format('Y-m-d-H-i-s') ); } @@ -122,7 +118,7 @@ class DumpCommand extends Command } if ($learning) { - $io->commentBlock($command); + $this->getIo()->commentBlock($command); } if ($this->shellProcess->exec($command, $this->appRoot)) { @@ -144,7 +140,7 @@ class DumpCommand extends Command } } - $io->success( + $this->getIo()->success( sprintf( '%s %s', $this->trans('commands.database.dump.messages.success'),