8000 [FrameworkBundle] Mark cache.default_*_provider services private by nicolas-grekas · Pull Request #20577 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Mark cache.default_*_provider services private #20577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[FrameworkBundle] Mark cache.default_*_provider services private
  • Loading branch information
nicolas-grekas committed Nov 21, 2016
commit 09adfda57e2b817ea8f6d0d3e7131490a401cbc6
Original file line number Diff line number Diff line change
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could even set it as private directly instead of getting the alias again:

setAlias('cache.'.$name, new Alias(..., false));

}
}
foreach (array('app', 'system') as $name) {
Expand Down
0