From 6928ad4bac13b369c0054eba01d4da2b46226bed Mon Sep 17 00:00:00 2001 From: "b.pliachenko" Date: Thu, 27 Feb 2020 16:04:33 +0200 Subject: [PATCH] fix opcache preload issue --- Source/Consistency.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Consistency.php b/Source/Consistency.php index 399c678..da8e3ec 100644 --- a/Source/Consistency.php +++ b/Source/Consistency.php @@ -109,9 +109,13 @@ public static function getEntityShortestName(string $entityName): string */ public static function flexEntity(string $entityName): bool { + $alias = static::getEntityShortestName($entityName); + if (class_exists($alias, false)) { + return true; + } return class_alias( $entityName, - static::getEntityShortestName($entityName), + $alias, false ); }