diff --git a/UPGRADE-4.4.md b/UPGRADE-4.4.md
index 216dd7ab83..67a2c8ba84 100644
--- a/UPGRADE-4.4.md
+++ b/UPGRADE-4.4.md
@@ -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
---------
diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md
index 81c9ed02f1..40c38088e5 100644
--- a/UPGRADE-5.0.md
+++ b/UPGRADE-5.0.md
@@ -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
---------
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
index 7ed04a5bb1..2c7f8732f5 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
@@ -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');
}
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/lock.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/lock.xml
index ce5b9c8d30..cdefecd176 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/lock.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/lock.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json
index cb4bec153c..f6abce9d4a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/composer.json
+++ b/src/Symfony/Bundle/FrameworkBundle/composer.json
@@ -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",