Skip to content

Commit 8b6f56e

Browse files
bug #46125 [FrameworkBundle] Always add CacheCollectorPass (fancyweb)
This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle] Always add CacheCollectorPass | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - I don't understand why, in addition to being tied to the `profiler` config being enabled, `CacheCollectorPass` is also tied to `kernel.debug` being true (compared to the other collector passes). My use case is that I use the cache collector data in tests but I don't run the tests in debug mode (for performance). Commits ------- 3fab417 [FrameworkBundle] Always add CacheCollectorPass
2 parents fd1c94b + 3fab417 commit 8b6f56e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ public function build(ContainerBuilder $container)
157157
$container->addCompilerPass(new RegisterReverseContainerPass(true));
158158
$container->addCompilerPass(new RegisterReverseContainerPass(false), PassConfig::TYPE_AFTER_REMOVING);
159159
$container->addCompilerPass(new SessionPass());
160+
$container->addCompilerPass(new CacheCollectorPass(), PassConfig::TYPE_BEFORE_REMOVING);
160161

161162
if ($container->getParameter('kernel.debug')) {
162163
$container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 2);
163164
$container->addCompilerPass(new UnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING);
164165
$container->addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_BEFORE_REMOVING, -255);
165-
$container->addCompilerPass(new CacheCollectorPass(), PassConfig::TYPE_BEFORE_REMOVING);
166166
}
167167
}
168168

0 commit comments

Comments
 (0)