public static function checkConfigFile($configName, $rootConfigDir, $siteConfigPath)
{
$fs = new Filesystem();
$configFileName = $configName . '.yml';
$configFileFullPath = $siteConfigPath . '/' . $configFileName;
$configFileDistName = $configName . '.yml.dist';
$configFileDistNameFullPath = $rootConfigDir . '/' . $configFileDistName;
if ($fs->exists($configFileFullPath)) {
if (is_readable($configFileFullPath)) {
return null;
}
throw new BootException(sprintf('Unable to read configuration file "%s"', $configFileName));
}
try {
$fs->copy($configFileDistNameFullPath, $configFileFullPath, false);
} catch (IOException $e) {
throw new BootException(sprintf('Unable to create configuration file "%s"', $configFileName));
}
return null;
}