Skip to content

Commit e4a2c17

Browse files
committed
minor #20666 [FrameworkBundle] mark alias as private during creation (xabbuh)
This PR was merged into the 3.1 branch. Discussion ---------- [FrameworkBundle] mark alias as private during creation | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20577 (comment) | License | MIT | Doc PR | n/a Commits ------- 828c761 mark alias as private during creation
2 parents 6459349 + 828c761 commit e4a2c17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection;
1313

1414
use Doctrine\Common\Annotations\Reader;
15+
use Symfony\Component\DependencyInjection\Alias;
1516
use Symfony\Component\DependencyInjection\ContainerBuilder;
1617
use Symfony\Component\DependencyInjection\ContainerInterface;
1718
use Symfony\Component\DependencyInjection\Definition;
@@ -1044,8 +1045,7 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
10441045

10451046
foreach (array('doctrine', 'psr6', 'redis') as $name) {
10461047
if (isset($config[$name = 'default_'.$name.'_provider'])) {
1047-
$container->setAlias('cache.'.$name, Compiler\CachePoolPass::getServiceProvider($container, $config[$name]));
1048-
$container->getAlias('cache.'.$name)->setPublic(false);
1048+
$container->setAlias('cache.'.$name, new Alias(Compiler\CachePoolPass::getServiceProvider($container, $config[$name]), false));
10491049
}
10501050
}
10511051
foreach (array('app', 'system') as $name) {

0 commit comments

Comments
 (0)