Skip to content

Commit a185129

Browse files
committed
Remove ServiceSubscriberInterface implementation
… from Service façade
1 parent 4612ff2 commit a185129

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

src/Symfony/Bundle/SecurityBundle/Security.php

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,21 @@
1313

1414
use Psr\Container\ContainerInterface;
1515
use Symfony\Bundle\SecurityBundle\Security\FirewallConfig;
16-
use Symfony\Component\DependencyInjection\ServiceLocator;
1716
use Symfony\Component\HttpFoundation\Request;
18-
use Symfony\Component\HttpFoundation\RequestStack;
1917
use Symfony\Component\HttpFoundation\Response;
2018
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
2119
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
2220
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
2321
use Symfony\Component\Security\Core\Authorization\UserAuthorizationCheckerInterface;
2422
use Symfony\Component\Security\Core\Exception\LogicException;
2523
use Symfony\Component\Security\Core\Exception\LogoutException;
26-
use Symfony\Component\Security\Core\User\UserCheckerInterface;
2724
use Symfony\Component\Security\Core\User\UserInterface;
2825
use Symfony\Component\Security\Csrf\CsrfToken;
29-
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
3026
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
3127
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface;
3228
use Symfony\Component\Security\Http\Event\LogoutEvent;
33-
use Symfony\Component\Security\Http\FirewallMapInterface;
3429
use Symfony\Component\Security\Http\ParameterBagUtils;
3530
use Symfony\Contracts\Service\ServiceProviderInterface;
36-
use Symfony\Contracts\Service\ServiceSubscriberInterface;
3731

3832
/**
3933
* Helper class for commonly-needed security tasks.
@@ -44,7 +38,7 @@
4438
*
4539
* @final
4640
*/
47-
class Security implements AuthorizationCheckerInterface, ServiceSubscriberInterface, UserAuthorizationCheckerInterface
41+
class Security implements AuthorizationCheckerInterface, UserAuthorizationCheckerInterface
4842
{
4943
public function __construct(
5044
private readonly ContainerInterface $container,
@@ -200,19 +194,4 @@ private function getAuthenticator(?string $authenticatorName, string $firewallNa
200194

201195
return $firewallAuthenticatorLocator->get($authenticatorId);
202196
}
203-
204-
public static function getSubscribedServices(): array
205-
{
206-
return [
207-
'security.token_storage' => TokenStorageInterface::class,
208-
'security.authorization_checker' => AuthorizationCheckerInterface::class,
209-
'security.user_authorization_checker' => UserAuthorizationCheckerInterface::class,
210-
'security.authenticator.managers_locator' => '?'.ServiceProviderInterface::class,
211-
'request_stack' => RequestStack::class,
212-
'security.firewall.map' => FirewallMapInterface::class,
213-
'security.user_checker' => UserCheckerInterface::class,
214-
'security.firewall.event_dispatcher_locator' => ServiceLocator::class,
215-
'security.csrf.token_manager' => '?'.CsrfTokenManagerInterface::class,
216-
];
217-
}
218197
}

0 commit comments

Comments
 (0)