private function copyDistFile(YamlFile $file)
{
$app = $this->getContainer();
$filesystem = $app['filesystem']->getFilesystem('extensions');
/** @var YamlFile $distFile */
$distFile = $filesystem->get(sprintf('%s/config/config.yml.dist', $this->getBaseDirectory()->getPath()), new YamlFile());
if (!$distFile->exists()) {
throw new \RuntimeException(sprintf('No config.yml.dist file found at extensions://%s', $this->getBaseDirectory()->getPath()));
}
$file->write($distFile->read());
$app['logger.system']->info(sprintf('Copied %s to %s', $distFile->getFullPath(), $file->getFullPath()), ['event' => 'extensions']);
}