setName('chill:person:import-socialwork') ->addOption('filepath', 'f', InputOption::VALUE_REQUIRED, 'The file to import.') ->addOption('language', 'l', InputOption::VALUE_OPTIONAL, 'The default language') ->setHelp($help); } protected function execute(InputInterface $input, OutputInterface $output): int { $filepath = $input->getOption('filepath'); try { $csv = Reader::createFromPath($filepath); } catch (\Throwable $e) { throw new \Exception('Error while loading CSV.', 0, $e); } $csv->setDelimiter(';'); return true === $this->importer->import($csv) ? 0 : 1; } }