File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
DependencyInjection/Compiler Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -30,18 +30,19 @@ public function process(ContainerBuilder $container)
3030 $ managers = $ container ->getParameter ('es.managers ' );
3131
3232 $ hasContainerBuildId = $ container ->hasParameter ('container.build_id ' );
33+ $ removeContainerBuildId = false ;
3334 if (!$ hasContainerBuildId ) {
3435 // the 'container.build_id' is required for `es.cache_engine` system cache which normally can not
3536 // be constructor inside a compiler pass. This is a workaround to make it work.
3637 // see also:
3738 // - https://github.com/symfony/symfony/blob/52a92926f7fed15cdff399c6921100a10e0d6f61/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php#L389
3839 // - https://github.com/symfony/symfony/blob/52a92926f7fed15cdff399c6921100a10e0d6f61/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L2322
39- $ hasContainerBuildId = true ;
4040 $ container ->setParameter ('container.build_id ' , hash ('crc32 ' , 'Abc123 ' . time ()));
41+ $ removeContainerBuildId = true ;
4142 }
4243
4344 $ collector = $ container ->get ('es.metadata_collector ' );
44- if (! $ hasContainerBuildId ) {
45+ if ($ removeContainerBuildId ) {
4546 $ container ->getParameterBag ()->remove ('container.build_id ' );
4647 }
4748
You can’t perform that action at this time.
0 commit comments