Skip to content

Commit

Permalink
Moved loading default Core settings to prepend stage
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed Dec 21, 2022
1 parent cdebc88 commit 5cad3cb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/bundle/Core/DependencyInjection/IbexaCoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ public function load(array $configs, ContainerBuilder $container)
$loader->load('routing/js_routing.yml');
}

// Default settings
$this->handleDefaultSettingsLoading($container, $loader);

$this->registerRepositoriesConfiguration($config, $container);
$this->registerSiteAccessConfiguration($config, $container);
$this->registerImageMagickConfiguration($config, $container);
Expand Down Expand Up @@ -191,6 +188,9 @@ public function prepend(ContainerBuilder $container)
$this->prependTranslatorConfiguration($container);
$this->prependDoctrineConfiguration($container);

// Default settings
$this->handleDefaultSettingsLoading($container);

$this->configureGenericSetup($container);
$this->configurePlatformShSetup($container);
}
Expand Down Expand Up @@ -229,15 +229,14 @@ private function getMainRepositoryConfigParser(): RepositoryConfigParserInterfac
}

/**
* Handle default settings.
*
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
* @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
*
* @throws \Exception
*/
private function handleDefaultSettingsLoading(ContainerBuilder $container, FileLoader $loader)
private function handleDefaultSettingsLoading(ContainerBuilder $container): void
{
$loader = new Loader\YamlFileLoader(
$container,
new FileLocator(__DIR__ . '/../Resources/config')
);
$loader->load('default_settings.yml');

foreach ($this->defaultSettingsCollection as $fileLocation => $files) {
Expand Down

0 comments on commit 5cad3cb

Please sign in to comment.