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 ); }