Skip to content

Commit 4d5f495

Browse files
committed
[SecurityBundle] Remove dead class_exists checks
1 parent d25741b commit 4d5f495

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

DependencyInjection/Security/Factory/LdapFactoryTrait.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public function getKey(): string
3535
public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string
3636
{
3737
$key = str_replace('-', '_', $this->getKey());
38-
if (!class_exists(LdapAuthenticator::class)) {
39-
throw new \LogicException(sprintf('The "%s" authenticator requires the "symfony/ldap" package version "5.1" or higher.', $key));
40-
}
41-
4238
$authenticatorId = parent::createAuthenticator($container, $firewallName, $config, $userProviderId);
4339

4440
$container->setDefinition('security.listener.'.$key.'.'.$firewallName, new Definition(CheckLdapCredentialsListener::class))

DependencyInjection/Security/Factory/LoginLinkFactory.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use Symfony\Component\DependencyInjection\Reference;
2121
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
2222
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;
23-
use Symfony\Component\Security\Http\LoginLink\LoginLinkHandler;
2423

2524
/**
2625
* @internal
@@ -88,10 +87,6 @@ public function getKey(): string
8887

8988
public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string
9089
{
91-
if (!class_exists(LoginLinkHandler::class)) {
92-
throw new \LogicException('Login login link requires symfony/security-http:^5.2.');
93-
}
94-
9590
if (!$container->hasDefinition('security.authenticator.login_link')) {
9691
$loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/../../Resources/config'));
9792
$loader->load('security_authenticator_login_link.php');

DependencyInjection/Security/Factory/LoginThrottlingFactory.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Symfony\Component\DependencyInjection\Reference;
2020
use Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface;
2121
use Symfony\Component\RateLimiter\RateLimiterFactory;
22-
use Symfony\Component\Security\Http\EventListener\LoginThrottlingListener;
2322
use Symfony\Component\Security\Http\RateLimiter\DefaultLoginRateLimiter;
2423

2524
/**
@@ -67,10 +66,6 @@ public function addConfiguration(NodeDefinition $builder)
6766

6867
public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): array
6968
{
70-
if (!class_exists(LoginThrottlingListener::class)) {
71-
throw new \LogicException('Login throttling requires symfony/security-http:^5.2.');
72-
}
73-
7469
if (!class_exists(RateLimiterFactory::class)) {
7570
throw new \LogicException('Login throttling requires the Rate Limiter component. Try running "composer require symfony/rate-limiter".');
7671
}

0 commit comments

Comments
 (0)