We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a20d37b commit cded391Copy full SHA for cded391
src/Turbo/src/Doctrine/ClassUtil.php
@@ -22,12 +22,7 @@ final class ClassUtil
22
public static function getEntityClass(object $entity): string
23
{
24
if ($entity instanceof LazyObjectInterface) {
25
- $entityClass = get_parent_class($entity);
26
- if (false === $entityClass) {
27
- throw new \LogicException('Parent class missing');
28
- }
29
-
30
- return $entityClass;
+ return get_parent_class($entity) ?: $entity::class;
31
}
32
33
// @legacy for old versions of Doctrine
0 commit comments