From 652ae00f6e0141c7d7ca548937260ab259756891 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Sat, 24 Aug 2019 12:36:40 +0200 Subject: [PATCH] Fix parameter names to be consistent with Symfony method declaration --- DependencyInjection/DoctrineExtension.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/DependencyInjection/DoctrineExtension.php b/DependencyInjection/DoctrineExtension.php index 67fd74d6d..c991c69be 100644 --- a/DependencyInjection/DoctrineExtension.php +++ b/DependencyInjection/DoctrineExtension.php @@ -734,29 +734,29 @@ protected function getMappingResourceExtension() : string /** * {@inheritDoc} */ - protected function loadCacheDriver($driverName, $entityManagerName, array $driverMap, ContainerBuilder $container) : string + protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheDriver, ContainerBuilder $container) : string { $serviceId = null; - $aliasId = $this->getObjectManagerElementName(sprintf('%s_%s', $entityManagerName, $driverName)); + $aliasId = $this->getObjectManagerElementName(sprintf('%s_%s', $objectManagerName, $cacheName)); - if ($driverMap['type'] === null) { - $driverMap = [ + if ($cacheDriver['type'] === null) { + $cacheDriver = [ 'type' => 'pool', - 'pool' => $this->getPoolNameForCacheDriver($driverName), + 'pool' => $this->getPoolNameForCacheDriver($cacheName), ]; } - switch ($driverMap['type']) { + switch ($cacheDriver['type']) { case 'service': - $serviceId = $driverMap['id']; + $serviceId = $cacheDriver['id']; break; case 'pool': - $serviceId = $this->createPoolCacheDefinition($container, $driverMap['pool']); + $serviceId = $this->createPoolCacheDefinition($container, $cacheDriver['pool']); break; case 'provider': - $serviceId = sprintf('doctrine_cache.providers.%s', $driverMap['cache_provider']); + $serviceId = sprintf('doctrine_cache.providers.%s', $cacheDriver['cache_provider']); break; } @@ -766,7 +766,7 @@ protected function loadCacheDriver($driverName, $entityManagerName, array $drive return $aliasId; } - return $this->adapter->loadCacheDriver($driverName, $entityManagerName, $driverMap, $container); + return $this->adapter->loadCacheDriver($cacheName, $objectManagerName, $cacheDriver, $container); } /**