From a18512923aae5410c87e0c641da54b8bfccb21e0 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sat, 7 Dec 2024 22:01:37 +0100 Subject: [PATCH] Remove ServiceSubscriberInterface implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … from Service façade --- .../Bundle/SecurityBundle/Security.php | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/Security.php b/src/Symfony/Bundle/SecurityBundle/Security.php index d3a3f0ed1bf59..c64433d0c4d3c 100644 --- a/src/Symfony/Bundle/SecurityBundle/Security.php +++ b/src/Symfony/Bundle/SecurityBundle/Security.php @@ -13,9 +13,7 @@ use Psr\Container\ContainerInterface; use Symfony\Bundle\SecurityBundle\Security\FirewallConfig; -use Symfony\Component\DependencyInjection\ServiceLocator; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; @@ -23,17 +21,13 @@ use Symfony\Component\Security\Core\Authorization\UserAuthorizationCheckerInterface; use Symfony\Component\Security\Core\Exception\LogicException; use Symfony\Component\Security\Core\Exception\LogoutException; -use Symfony\Component\Security\Core\User\UserCheckerInterface; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Csrf\CsrfToken; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; use Symfony\Component\Security\Http\Event\LogoutEvent; -use Symfony\Component\Security\Http\FirewallMapInterface; use Symfony\Component\Security\Http\ParameterBagUtils; use Symfony\Contracts\Service\ServiceProviderInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; /** * Helper class for commonly-needed security tasks. @@ -44,7 +38,7 @@ * * @final */ -class Security implements AuthorizationCheckerInterface, ServiceSubscriberInterface, UserAuthorizationCheckerInterface +class Security implements AuthorizationCheckerInterface, UserAuthorizationCheckerInterface { public function __construct( private readonly ContainerInterface $container, @@ -200,19 +194,4 @@ private function getAuthenticator(?string $authenticatorName, string $firewallNa return $firewallAuthenticatorLocator->get($authenticatorId); } - - public static function getSubscribedServices(): array - { - return [ - 'security.token_storage' => TokenStorageInterface::class, - 'security.authorization_checker' => AuthorizationCheckerInterface::class, - 'security.user_authorization_checker' => UserAuthorizationCheckerInterface::class, - 'security.authenticator.managers_locator' => '?'.ServiceProviderInterface::class, - 'request_stack' => RequestStack::class, - 'security.firewall.map' => FirewallMapInterface::class, - 'security.user_checker' => UserCheckerInterface::class, - 'security.firewall.event_dispatcher_locator' => ServiceLocator::class, - 'security.csrf.token_manager' => '?'.CsrfTokenManagerInterface::class, - ]; - } }