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