Skip to content

Commit ec12e41

Browse files
committed
Add mechanisme to prevent using outdated config
1 parent 236391e commit ec12e41

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

DependencyInjection/Security/Factory/LoginThrottlingFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ private function registerRateLimiter(ContainerBuilder $container, string $name,
9898
if (!interface_exists(LockInterface::class)) {
9999
throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be installed. Try running "composer require symfony/lock".', $name));
100100
}
101+
if (!$container->hasDefinition('lock.factory.abstract')) {
102+
throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be configured.', $name));
103+
}
101104

102105
$limiter->replaceArgument(2, new Reference($limiterConfig['lock_factory']));
103106
}

0 commit comments

Comments
 (0)