Command/ConvertCommand.php
protected function determineFile(OutputInterface $output, $givenFileName)
    {
        if (is_file($givenFileName)) {
            return new \SplFileInfo($givenFileName);
        }

        return $this->chooseFileInDirectory(
            $output,
            $this->chooseBundle($output)->getPath().'/Resources/config/'
        );
    }
protected function determineFile(OutputInterface $output, $givenFileName)
    {
        if (is_file($givenFileName)) {
            return new \SplFileInfo($givenFileName);
        }

        return $this->chooseFileInDirectory(
            $output,
            $this->chooseBundle($output)->getPath().'/Resources/config/'
        );
    }
Choose file from cli input or interactively

@param  OutputInterface $output
@param  string          $givenFileName
@return SplFileInfo