From 51a9a3969a8848430822975be01a4f4e29f54aec Mon Sep 17 00:00:00 2001 From: LucasP Date: Mon, 13 Apr 2026 16:40:42 +0200 Subject: [PATCH] FEATURE: AN-27471 - Fix Proxies class name in database logs --- src/Entity/Log.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Entity/Log.php b/src/Entity/Log.php index cb46968..1023af2 100755 --- a/src/Entity/Log.php +++ b/src/Entity/Log.php @@ -5,6 +5,7 @@ namespace AssoConnect\LogBundle\Entity; use DateTimeImmutable; +use Doctrine\Common\Util\ClassUtils; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Security\Core\User\UserInterface; @@ -21,7 +22,7 @@ public function __construct( ?string $entityOldValue, string $requestTrace, ) { - $this->entityClass = $entity::class; + $this->entityClass = ClassUtils::getRealClass($entity::class); $this->entityColumn = $entityColumn; $this->entityOldValue = $entityOldValue !== null ? mb_substr($entityOldValue, 0, Log::MAX_STRING_LENGTH) : null; $this->requestTrace = $requestTrace;