protected function loadFile($filename)
{
$configYaml = $this->getFileContent($filename);
$config = \Symfony\Component\Yaml\Yaml::parse($configYaml);
if (!isset($config['profiles'])) {
throw new \Exception('Could not find "profiles" key');
}
if (!is_array($config['profiles']) || count($config['profiles']) == 0) {
throw new \Exception('Could not find any profiles');
}
return $config['profiles'];
}