Navigation Menu

Skip to content

Commit

Permalink
bug #35117 [Cache] do not overwrite variable value (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] do not overwrite variable value

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35030
| License       | MIT
| Doc PR        |

Commits
-------

e379dbb do not overwrite variable value
  • Loading branch information
nicolas-grekas committed Dec 28, 2019
2 parents 9876de2 + e379dbb commit b6403d8
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -54,7 +54,7 @@ public function process(ContainerBuilder $container)
}
$seed .= '.'.$container->getParameter('kernel.container_class');

$pools = [];
$allPools = [];
$clearers = [];
$attributes = [
'provider',
Expand Down Expand Up @@ -119,15 +119,15 @@ public function process(ContainerBuilder $container)
$clearers[$clearer][$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE);
}

$pools[$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE);
$allPools[$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE);
}

$notAliasedCacheClearerId = $this->cacheClearerId;
while ($container->hasAlias($this->cacheClearerId)) {
$this->cacheClearerId = (string) $container->getAlias($this->cacheClearerId);
}
if ($container->hasDefinition($this->cacheClearerId)) {
$clearers[$notAliasedCacheClearerId] = $pools;
$clearers[$notAliasedCacheClearerId] = $allPools;
}

foreach ($clearers as $id => $pools) {
Expand All @@ -145,7 +145,7 @@ public function process(ContainerBuilder $container)
}

if ($container->hasDefinition('console.command.cache_pool_list')) {
$container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, array_keys($pools));
$container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, array_keys($allPools));
}
}

Expand Down

0 comments on commit b6403d8

Please sign in to comment.