8000 [Security] Fix opcache preload with alias classes · symfony/symfony@acfeaf6 · GitHub
[go: up one dir, main page]

Skip to content

Commit acfeaf6

Browse files
committed
[Security] Fix opcache preload with alias classes
1 parent 0d65a49 commit acfeaf6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Symfony/Component/Security/Core/Exception/UserNotFoundException.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,7 @@ public function __unserialize(array $data): void
9393
parent::__unserialize($parentData);
9494
}
9595
}
96-
class_alias(UserNotFoundException::class, UsernameNotFoundException::class);
96+
97+
if (!class_exists(UsernameNotFoundException::class, false)) {
98+
class_alias(UserNotFoundException::class, UsernameNotFoundException::class);
99+
}

src/Symfony/Component/Security/Core/User/InMemoryUserChecker.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,7 @@ public function checkPostAuth(UserInterface $user)
6767
}
6868
}
6969
}
70-
class_alias(InMemoryUserChecker::class, UserChecker::class);
70+
71+
if (!class_exists(UserChecker::class, false)) {
72+
class_alias(InMemoryUserChecker::class, UserChecker::class);
73+
}

0 commit comments

Comments
 (0)
0