Skip to content

Commit 1bfbd24

Browse files
committed
minor #44157 [FrameworkBundle] Remove code relating to old StoreInterface (jderusse)
This PR was merged into the 6.0 branch. Discussion ---------- [FrameworkBundle] Remove code relating to old StoreInterface | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - The interface has been remove in symfony/lock 5.0, (but FWB was still compatible with symfony/lock 4.4). Now FWB conflicts with <5.4 we can finally remove this reference I also forgot to remove the `$lockDefinition` definition in #41284 Commits ------- a0a431cdfd Remove code relating to old SotreInterface
2 parents d2dd47d + fba68cf commit 1bfbd24

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,9 @@
8181
use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface;
8282
use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface;
8383
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
84-
use Symfony\Component\Lock\Lock;
8584
use Symfony\Component\Lock\LockFactory;
8685
use Symfony\Component\Lock\PersistingStoreInterface;
8786
use Symfony\Component\Lock\Store\StoreFactory;
88-
use Symfony\Component\Lock\StoreInterface;
8987
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory;
9088
use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory;
9189
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory;
@@ -1815,7 +1813,7 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
18151813
$storeDefinitions = [];
18161814
foreach ($resourceStores as $storeDsn) {
18171815
$storeDsn = $container->resolveEnvPlaceholders($storeDsn, null, $usedEnvs);
1818-
$storeDefinition = new Definition(interface_exists(StoreInterface::class) ? StoreInterface::class : PersistingStoreInterface::class);
1816+
$storeDefinition = new Definition(PersistingStoreInterface::class);
18191817
$storeDefinition->setFactory([StoreFactory::class, 'createStore']);
18201818
$storeDefinition->setArguments([$storeDsn]);
18211819

@@ -1838,12 +1836,6 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
18381836
$factoryDefinition->replaceArgument(0, new Reference($storeDefinitionId));
18391837
$container->setDefinition('lock.'.$resourceName.'.factory', $factoryDefinition);
18401838

1841-
// Generate services for lock instances
1842-
$lockDefinition = new Definition(Lock::class);
1843-
$lockDefinition->setPublic(false);
1844-
$lockDefinition->setFactory([new Reference('lock.'.$resourceName.'.factory'), 'createLock']);
1845-
$lockDefinition->setArguments([$resourceName]);
1846-
18471839
// provide alias for default resource
18481840
if ('default' === $resourceName) {
18491841
$container->setAlias('lock.factory', new Alias('lock.'.$resourceName.'.factory', false));

0 commit comments

Comments
 (0)