Skip to content

Commit

Permalink
bug #20577 [FrameworkBundle] Mark cache.default_*_provider services p…
Browse files Browse the repository at this point in the history
…rivate (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 | #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
  • Loading branch information
fabpot committed Nov 21, 2016
2 parents f09b933 + 09adfda commit bd34b67
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -1045,6 +1045,7 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
foreach (array('doctrine', 'psr6', 'redis') as $name) {
if (isset($config[$name = 'default_'.$name.'_provider'])) {
$container->setAlias('cache.'.$name, Compiler\CachePoolPass::getServiceProvider($container, $config[$name]));
$container->getAlias('cache.'.$name)->setPublic(false);
}
}
foreach (array('app', 'system') as $name) {
Expand Down

0 comments on commit bd34b67

Please sign in to comment.