setName("composer") ->addOption( 'install', 'i', InputOption::VALUE_NONE, 'install the dependencies' ) ->addOption( 'update', 'u', InputOption::VALUE_NONE, 'update the dependencies' ) ->setDescription("Updates the composer vendor dependencies needed by Grav.") ->setHelp('The composer command updates the composer vendor dependencies needed by Grav'); } /** * @return int|null|void */ protected function serve() { $action = $this->input->getOption('install') ? 'install' : ($this->input->getOption('update') ? 'update' : 'install'); if ($this->input->getOption('install')) { $action = 'install'; } // Updates composer first $this->output->writeln("\nInstalling vendor dependencies"); $this->output->writeln($this->composerUpdate(GRAV_ROOT, $action)); } }