addArgument('config', InputArgument::OPTIONAL, 'Configuration file', "config.yml"); } protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('Reading from: '.$input->getArgument('config')); try { $config = Yaml::parseFile($input->getArgument('config')); } catch (ParseException $e) { $output->writeln('Unable to parse the YAML string: '. $e->getMessage()); return Command::FAILURE; } $table = new Table($output); $table ->setHeaders(['Description', 'Source', 'Destination']) ->setRows($config['backup']); ; $table->render(); return Command::SUCCESS; } }