protected function saveBehatConfig($projectPath, OutputInterface $output, $behat, $progress) { $dumper = new Dumper(); $yaml = $dumper->dump($behat, 6); try { file_put_contents($projectPath . '/behat.yml', $yaml); $progress->advance(); } catch (\Exception $e) { $output->writeln('<error>Unable to write to the YAML file</error>'); } }