Skip to content

Commit ab4d02d

Browse files
committed
minor #24366 [Lock] Use cache connection factories in lock (jderusse)
This PR was merged into the 3.4 branch. Discussion ---------- [Lock] Use cache connection factories in lock | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no (feature removal) | BC breaks? | no (if merged in 3.4) | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | An alternative to symfony/symfony#24267 to share code between cache and lock. Commits ------- 95358ac98f Share connection factories between cache and lock
2 parents b279456 + c32d377 commit ab4d02d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
2424
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
2525
use Symfony\Bundle\FrameworkBundle\Routing\AnnotatedRouteControllerLoader;
26+
use Symfony\Component\Cache\Adapter\AbstractAdapter;
2627
use Symfony\Component\Cache\Adapter\AdapterInterface;
2728
use Symfony\Component\Cache\Adapter\ArrayAdapter;
2829
use Symfony\Component\Cache\ResettableInterface;
@@ -1706,7 +1707,7 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
17061707
if (!$container->hasDefinition($connectionDefinitionId = $container->hash($storeDsn))) {
17071708
$connectionDefinition = new Definition(\stdClass::class);
17081709
$connectionDefinition->setPublic(false);
1709-
$connectionDefinition->setFactory(array(StoreFactory::class, 'createConnection'));
1710+
$connectionDefinition->setFactory(array(AbstractAdapter::class, 'createConnection'));
17101711
$connectionDefinition->setArguments(array($storeDsn));
17111712
$container->setDefinition($connectionDefinitionId, $connectionDefinition);
17121713
}

0 commit comments

Comments
 (0)