Skip to content

Commit 8ff079a

Browse files
committed
[Lock] add aliases for LockFactory
1 parent 5fdfc7a commit 8ff079a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
7272
use Symfony\Component\Lock\Factory;
7373
use Symfony\Component\Lock\Lock;
74+
use Symfony\Component\Lock\LockFactory;
7475
use Symfony\Component\Lock\LockInterface;
7576
use Symfony\Component\Lock\PersistStoreInterface;
7677
use Symfony\Component\Lock\Store\FlockStore;
@@ -1644,11 +1645,13 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
16441645
$container->setAlias(StoreInterface::class, new Alias('lock.store', false));
16451646
$container->setAlias(PersistStoreInterface::class, new Alias('lock.store', false));
16461647
$container->setAlias(Factory::class, new Alias('lock.factory', false));
1648+
$container->setAlias(LockFactory::class, new Alias('lock.factory', false));
16471649
$container->setAlias(LockInterface::class, new Alias('lock', false));
16481650
} else {
16491651
$container->registerAliasForArgument('lock.'.$resourceName.'.store', StoreInterface::class, $resourceName.'.lock.store');
16501652
$container->registerAliasForArgument('lock.'.$resourceName.'.store', PersistStoreInterface::class, $resourceName.'.lock.store');
16511653
$container->registerAliasForArgument('lock.'.$resourceName.'.factory', Factory::class, $resourceName.'.lock.factory');
1654+
$container->registerAliasForArgument('lock.'.$resourceName.'.factory', LockFactory::class, $resourceName.'.lock.factory');
16521655
$container->registerAliasForArgument('lock.'.$resourceName, LockInterface::class, $resourceName.'.lock');
16531656
}
16541657
}

Resources/config/lock.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<service id="lock.strategy.majority" class="Symfony\Component\Lock\Strategy\ConsensusStrategy" />
2828

29-
<service id="lock.factory.abstract" class="Symfony\Component\Lock\Factory" abstract="true">
29+
<service id="lock.factory.abstract" class="Symfony\Component\Lock\LockFactory" abstract="true">
3030
<tag name="monolog.logger" channel="lock" />
3131
<argument /> <!-- Store -->
3232
<call method="setLogger">

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"symfony/workflow": "^4.3|^5.0",
5858
"symfony/yaml": "^3.4|^4.0|^5.0",
5959
"symfony/property-info": "^3.4|^4.0|^5.0",
60-
"symfony/lock": "^3.4|^4.0|^5.0",
60+
"symfony/lock": "^4.4|^5.0",
6161
"symfony/web-link": "^3.4|^4.0|^5.0",
6262
"doctrine/annotations": "~1.0",
6363
"phpdocumentor/reflection-docblock": "^3.0|^4.0",
@@ -74,6 +74,7 @@
7474
"symfony/dotenv": "<4.2",
7575
"symfony/dom-crawler": "<4.3",
7676
"symfony/form": "<4.3",
77+
"symfony/lock": "<4.4",
7778
"symfony/messenger": "<4.3",
7879
"symfony/property-info": "<3.4",
7980
"symfony/serializer": "<4.2",

0 commit comments

Comments
 (0)