deploymentsFactory = $deploymentsFactory; $this->serviceShellUser = $serviceShellUser; parent::__construct($name); } /** * {@inheritdoc} */ protected function configure() { $this->setName("newrelic:create:deploy-marker"); $this->setDescription("Check the deploy queue for entries and create an appropriate deploy marker.") ->addArgument( 'message', InputArgument::REQUIRED, 'Deploy Message?' ) ->addArgument( 'change_log', InputArgument::REQUIRED, 'Change Log?' ) ->addArgument( 'user', InputArgument::OPTIONAL, 'Deployment User' ); parent::configure(); } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $this->deploymentsFactory->create()->setDeployment( $input->getArgument('message'), $input->getArgument('change_log'), $this->serviceShellUser->get($input->getArgument('user')) ); $output->writeln('NewRelic deployment information sent'); } }