Skip to content

Commit cdee332

Browse files
committed
[Security] Move the Security helper to SecurityBundle
1 parent b44c847 commit cdee332

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@
186186
use Symfony\Component\RateLimiter\Storage\CacheStorage;
187187
use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader;
188188
use Symfony\Component\Routing\Loader\AnnotationFileLoader;
189+
use Symfony\Component\Security\Core\AuthenticationEvents;
189190
use Symfony\Component\Security\Core\Exception\AuthenticationException;
190-
use Symfony\Component\Security\Core\Security;
191191
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
192192
use Symfony\Component\Semaphore\PersistingStoreInterface as SemaphoreStoreInterface;
193193
use Symfony\Component\Semaphore\Semaphore;
@@ -1020,7 +1020,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
10201020
throw new LogicException('Cannot guard workflows as the ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".');
10211021
}
10221022

1023-
if (!class_exists(Security::class)) {
1023+
if (!class_exists(AuthenticationEvents::class)) {
10241024
throw new LogicException('Cannot guard workflows as the Security component is not installed. Try running "composer require symfony/security-core".');
10251025
}
10261026

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface;
5858
use Symfony\Component\Messenger\Transport\TransportFactory;
5959
use Symfony\Component\PropertyAccess\PropertyAccessor;
60-
use Symfony\Component\Security\Core\Security;
60+
use Symfony\Component\Security\Core\AuthenticationEvents;
6161
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
6262
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
6363
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
@@ -1036,7 +1036,7 @@ public function testTranslator()
10361036
$files,
10371037
'->registerTranslatorConfiguration() finds Form translation resources'
10381038
);
1039-
$ref = new \ReflectionClass(Security::class);
1039+
$ref = new \ReflectionClass(AuthenticationEvents::class);
10401040
$this->assertContains(
10411041
strtr(\dirname($ref->getFileName()).'/Resources/translations/security.en.xlf', '/', \DIRECTORY_SEPARATOR),
10421042
$files,

0 commit comments

Comments
 (0)