minor #32508 [Lock] add aliases for LockFactory (Simperfit)

This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] add aliases for LockFactory

| Q             | A
| ------------- | ---
| Branch?       |4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->
see https://github.com/symfony/symfony/pull/32495/files#r302844198, add missing aliases in 4.4 and in 5.0 we just remove the old classes and aliases.

Commits
-------

5f301688ac [Lock] add aliases for LockFactory
This commit is contained in:
Nicolas Grekas 2019-07-15 15:22:23 +02:00
commit e9ab2343df
5 changed files with 8 additions and 2 deletions

View File

@ -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
---------

View File

@ -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
---------

View File

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

View File

@ -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">

View File

@ -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",