Skip to content

Commit 4651fef

Browse files
kaznovacnicolas-grekas
authored andcommitted
[SecurityBundle] Fix redeclaration of InternalSecurity class when opcache preload is active
1 parent b6ae3aa commit 4651fef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Bundle/SecurityBundle/Security.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
use Symfony\Component\Security\Http\SecurityRequestAttributes;
3131
use Symfony\Contracts\Service\ServiceProviderInterface;
3232

33+
if (class_exists(InternalSecurity::class, false)) {
34+
return;
35+
}
3336
if (class_exists(LegacySecurity::class)) {
3437
class_alias(LegacySecurity::class, InternalSecurity::class);
3538
} else {

0 commit comments

Comments
 (0)