Skip to content

Commit

Permalink
Merge pull request #1009 from alcaeus/fix-parameter-names
Browse files Browse the repository at this point in the history
Fix parameter names to be consistent with Symfony method declaration
  • Loading branch information
alcaeus authored Aug 24, 2019
2 parents ea7b4ac + 652ae00 commit 6728ed9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions DependencyInjection/DoctrineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
}

/**
Expand Down

0 comments on commit 6728ed9

Please sign in to comment.