15 use Symfony\Component\Console\Command\Command;
16 use Symfony\Component\Console\Input\InputOption;
17 use Symfony\Component\Console\Input\InputInterface;
18 use Symfony\Component\Console\Output\OutputInterface;
40 private $objectManager;
49 $this->objectManager = $objectManagerProvider->
get();
50 parent::__construct();
61 self::INPUT_KEY_OUTPUT,
63 InputOption::VALUE_REQUIRED,
78 abstract protected function buildReport($outputPath);
90 protected function execute(InputInterface $input, OutputInterface
$output)
96 $dirSearch = $this->objectManager->get(\
Magento\Framework\Component\DirSearch::class);
100 $this->
buildReport($input->getOption(self::INPUT_KEY_OUTPUT));
101 $output->writeln(
'<info>Report successfully processed.</info>');
104 '<error>Please check the path you provided. Dependencies report generator failed with error: ' .
105 $e->getMessage() .
'</error>' 108 return \Magento\Framework\Console\Cli::RETURN_FAILURE;
110 return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
const INPUT_KEY_DIRECTORY
__construct(ObjectManagerProvider $objectManagerProvider)
static setInstance(Files $instance=null)
getDefaultOutputFilename()