Skip to content

Commit bd34b67

Browse files
committed
bug symfony#20577 [FrameworkBundle] Mark cache.default_*_provider services private (nicolas-grekas)
This PR was merged into the 3.1 branch. Discussion ---------- [FrameworkBundle] Mark cache.default_*_provider services private | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#20563 | License | MIT | Doc PR | - I know making a service private has a potential for breaking BC. Yet, these services should not be used directly in controllers/userland code, and I really doubt anyone did. Let's make it private now and fix linked issue (even if it's a false positive from SymfonyServiceDefinitionValidator, it shows we have this service that really isn't meant to be public). Commits ------- 09adfda [FrameworkBundle] Mark cache.default_*_provider services private
2 parents f09b933 + 09adfda commit bd34b67

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,7 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
10451045
foreach (array('doctrine', 'psr6', 'redis') as $name) {
10461046
if (isset($config[$name = 'default_'.$name.'_provider'])) {
10471047
$container->setAlias('cache.'.$name, Compiler\CachePoolPass::getServiceProvider($container, $config[$name]));
1048+
$container->getAlias('cache.'.$name)->setPublic(false);
10481049
}
10491050
}
10501051
foreach (array('app', 'system') as $name) {

0 commit comments

Comments
 (0)