importer = $socialWorkMetadata; } protected function configure() { $this ->setName('chill:person:import-socialwork') ->addOption('filepath', 'f', InputOption::VALUE_REQUIRED, 'The file to import.') ->addOption('language', 'l', InputOption::VALUE_OPTIONAL, 'The default language'); } protected function execute(InputInterface $input, OutputInterface $output) { $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; } }