/** * @param ConsoleConfig $config * @param ConsoleDispatcher $dispatcher * @param DirectoriesInterface $directories * @param FilesInterface $files */ public function perform(ConsoleConfig $config, ConsoleDispatcher $dispatcher, DirectoriesInterface $directories, FilesInterface $files) { $this->ensurePermissions($directories, $files); $this->writeln("\n<info>Re-indexing available console commands...</info>"); $dispatcher->command('console:reload', [], $this->output); $this->writeln("\n<info>Reloading bootload cache...</info>"); $dispatcher->command('app:reload', [], $this->output); $this->writeln("\n<info>Re-loading translator locales cache...</info>"); $dispatcher->command('i18n:reload', [], $this->output); $this->writeln("\n<info>Scanning translate function and [[values]] usage...</info>"); $dispatcher->command('i18n:index', [], $this->output); $this->writeln(""); //Additional commands foreach ($config->configureSequence() as $command => $options) { if (!empty($options['header'])) { $this->writeln($options['header']); } $dispatcher->command($command, $options['options'], $this->output); if (!empty($options['footer'])) { $this->writeln($options['footer']); } } if ($this->option('key')) { $this->writeln(""); $dispatcher->command('app:key', [], $this->output); } $this->writeln("\n<info>All done!</info>"); }
/** * @param ConsoleConfig $config * @param ConsoleDispatcher $dispatcher */ public function perform(ConsoleConfig $config, ConsoleDispatcher $dispatcher) { foreach ($config->updateSequence() as $command => $options) { if (!empty($options['header'])) { $this->writeln($options['header']); } $dispatcher->command($command, $options['options'], $this->output); if (!empty($options['footer'])) { $this->writeln($options['footer']); } } }