Skip to content

Commit a20d37b

Browse files
committed
bug #1475 [Turbo] add missing use statement (jrushlow)
This PR was merged into the 2.x branch. Discussion ---------- [Turbo] add missing use statement | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | | License | MIT The new `Ux\...\ClassUtil` and the legacy `Doctrine\...\ClassUtils` are very similar. Adding the missing use statement with an alias to avoid IDE confusion :) Commits ------- 6e5fe19 [Turbo] add missing use statement
2 parents 0143930 + 6e5fe19 commit a20d37b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Turbo/src/Doctrine/ClassUtil.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\UX\Turbo\Doctrine;
1313

14+
use Doctrine\Common\Util\ClassUtils as LegacyClassUtils;
1415
use Symfony\Component\VarExporter\LazyObjectInterface;
1516

1617
/**
@@ -30,8 +31,8 @@ public static function getEntityClass(object $entity): string
3031
}
3132

3233
// @legacy for old versions of Doctrine
33-
if (class_exists(ClassUtils::class)) {
34-
return ClassUtils::getClass($entity);
34+
if (class_exists(LegacyClassUtils::class)) {
35+
return LegacyClassUtils::getClass($entity);
3536
}
3637

3738
return $entity::class;

0 commit comments

Comments
 (0)