[Lock] add aliases for LockFactory
This commit is contained in:
parent
95e8a651c2
commit
5f301688ac
@ -100,6 +100,7 @@ Lock
|
||||
|
||||
* Deprecated `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and
|
||||
`Symfony\Component\Lock\PersistStoreInterface`.
|
||||
* `Factory` is deprecated, use `LockFactory` instead
|
||||
|
||||
Messenger
|
||||
---------
|
||||
|
@ -307,6 +307,7 @@ Lock
|
||||
|
||||
* Removed `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and
|
||||
`Symfony\Component\Lock\PersistStoreInterface`.
|
||||
* Removed `Factory`, use `LockFactory` instead
|
||||
|
||||
Messenger
|
||||
---------
|
||||
|
@ -71,6 +71,7 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
use Symfony\Component\Lock\Factory;
|
||||
use Symfony\Component\Lock\Lock;
|
||||
use Symfony\Component\Lock\LockFactory;
|
||||
use Symfony\Component\Lock\LockInterface;
|
||||
use Symfony\Component\Lock\PersistStoreInterface;
|
||||
use Symfony\Component\Lock\Store\FlockStore;
|
||||
@ -1644,11 +1645,13 @@ class FrameworkExtension extends Extension
|
||||
$container->setAlias(StoreInterface::class, new Alias('lock.store', false));
|
||||
$container->setAlias(PersistStoreInterface::class, new Alias('lock.store', false));
|
||||
$container->setAlias(Factory::class, new Alias('lock.factory', false));
|
||||
$container->setAlias(LockFactory::class, new Alias('lock.factory', false));
|
||||
$container->setAlias(LockInterface::class, new Alias('lock', false));
|
||||
} else {
|
||||
$container->registerAliasForArgument('lock.'.$resourceName.'.store', StoreInterface::class, $resourceName.'.lock.store');
|
||||
$container->registerAliasForArgument('lock.'.$resourceName.'.store', PersistStoreInterface::class, $resourceName.'.lock.store');
|
||||
$container->registerAliasForArgument('lock.'.$resourceName.'.factory', Factory::class, $resourceName.'.lock.factory');
|
||||
$container->registerAliasForArgument('lock.'.$resourceName.'.factory', LockFactory::class, $resourceName.'.lock.factory');
|
||||
$container->registerAliasForArgument('lock.'.$resourceName, LockInterface::class, $resourceName.'.lock');
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
<service id="lock.strategy.majority" class="Symfony\Component\Lock\Strategy\ConsensusStrategy" />
|
||||
|
||||
<service id="lock.factory.abstract" class="Symfony\Component\Lock\Factory" abstract="true">
|
||||
<service id="lock.factory.abstract" class="Symfony\Component\Lock\LockFactory" abstract="true">
|
||||
<tag name="monolog.logger" channel="lock" />
|
||||
<argument /> <!-- Store -->
|
||||
<call method="setLogger">
|
||||
|
@ -57,7 +57,7 @@
|
||||
"symfony/workflow": "^4.3|^5.0",
|
||||
"symfony/yaml": "^3.4|^4.0|^5.0",
|
||||
"symfony/property-info": "^3.4|^4.0|^5.0",
|
||||
"symfony/lock": "^3.4|^4.0|^5.0",
|
||||
"symfony/lock": "^4.4|^5.0",
|
||||
"symfony/web-link": "^3.4|^4.0|^5.0",
|
||||
"doctrine/annotations": "~1.0",
|
||||
"phpdocumentor/reflection-docblock": "^3.0|^4.0",
|
||||
@ -74,6 +74,7 @@
|
||||
"symfony/dotenv": "<4.2",
|
||||
"symfony/dom-crawler": "<4.3",
|
||||
"symfony/form": "<4.3",
|
||||
"symfony/lock": "<4.4",
|
||||
"symfony/messenger": "<4.3",
|
||||
"symfony/property-info": "<3.4",
|
||||
"symfony/serializer": "<4.2",
|
||||
|
Reference in New Issue
Block a user