Skip to content

Commit

Permalink
Merge pull request #45 from webfactory/171239-always-use-wfdmetaconfi…
Browse files Browse the repository at this point in the history
…gcachefactory

Always decorate Symfonys `config_cache_factory` service with `WfdMetaConfigCacheFactory` (Case 171239)
  • Loading branch information
MalteWunsch authored May 15, 2024
2 parents 84c21f6 + 8a333ea commit a1912d4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 34 deletions.
2 changes: 0 additions & 2 deletions src/DependencyInjection/WebfactoryWfdMetaExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public function load(array $configs, ContainerBuilder $container): void

if ($config['always_expire_wfd_meta_resources']) {
$yamlLoader->load('cache_busting.yml');
} else {
$xmlLoader->load('config_cache_factory.xml');
}
}
}
32 changes: 0 additions & 32 deletions src/Resources/config/config_cache_factory.xml

This file was deleted.

6 changes: 6 additions & 0 deletions src/Resources/config/legacy_aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ services:
deprecated:
package: 'webfactory/wfdmeta-bundle'
version: '3.9.0'

webfactory_wfd_meta.config_cache_factory:
alias: 'Webfactory\Bundle\WfdMetaBundle\Config\WfdMetaConfigCacheFactory'
deprecated:
package: 'webfactory/wfdmeta-bundle'
version: '3.9.0'
15 changes: 15 additions & 0 deletions src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,20 @@
<tag name="controller.service_arguments"/>
</service>

<service id="Webfactory\Bundle\WfdMetaBundle\Config\WfdMetaConfigCacheFactory" decorates="config_cache_factory">
<argument type="service" id="Webfactory\Bundle\WfdMetaBundle\Config\WfdMetaConfigCacheFactory.inner" />
<argument type="service" id="Webfactory\Bundle\WfdMetaBundle\MetaQueryFactory" />
<argument type="service">
<service class="Symfony\Component\Lock\LockFactory">
<argument type="service">
<service class="Symfony\Component\Lock\Store\FlockStore" />
</argument>
<call method="setLogger">
<argument type="service" id="logger" on-invalid="ignore" />
</call>
<tag name="monolog.logger" channel="webfactory_wfd_meta" />
</service>
</argument>
</service>
</services>
</container>

0 comments on commit a1912d4

Please sign in to comment.