Skip to content

Commit

Permalink
fix: move parameter setting above service loading
Browse files Browse the repository at this point in the history
  • Loading branch information
daFish committed Sep 11, 2024
1 parent b4b6388 commit 6570e6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DependencyInjection/PrestaSitemapExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ public function load(array $configs, ContainerBuilder $container): void
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);

$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
$loader->load('services.xml');

$container->setParameter($this->getAlias() . '.dump_directory', (string)$config['dump_directory']);
$container->setParameter($this->getAlias() . '.timetolive', (int)$config['timetolive']);
$container->setParameter($this->getAlias() . '.sitemap_file_prefix', (string)$config['sitemap_file_prefix']);
$container->setParameter($this->getAlias() . '.items_by_set', (int)$config['items_by_set']);
$container->setParameter($this->getAlias() . '.defaults', $config['defaults']);
$container->setParameter($this->getAlias() . '.default_section', (string)$config['default_section']);

$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
$loader->load('services.xml');

if (true === $config['route_annotation_listener']) {
$loader->load('route_annotation_listener.xml');

Expand Down

0 comments on commit 6570e6d

Please sign in to comment.