From 3e9a0c93eb01df5b3481764cbb0f1e94a582f677 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Fri, 20 Mar 2026 14:20:17 +0100 Subject: [PATCH] fix(admin) : embed client and project in user list serialization Client.id/name and Project.id/name were missing the user:list group, causing them to be serialized as IRI strings instead of embedded objects. This broke the user edit form which expected object properties. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/Entity/Client.php | 4 ++-- src/Entity/Project.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Entity/Client.php b/src/Entity/Client.php index b98ffad..1a2e6b7 100644 --- a/src/Entity/Client.php +++ b/src/Entity/Client.php @@ -34,11 +34,11 @@ class Client #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] - #[Groups(['client:read', 'project:read'])] + #[Groups(['client:read', 'project:read', 'user:list'])] private ?int $id = null; #[ORM\Column(length: 255)] - #[Groups(['client:read', 'client:write', 'project:read'])] + #[Groups(['client:read', 'client:write', 'project:read', 'user:list'])] private ?string $name = null; #[ORM\Column(length: 255, nullable: true)] diff --git a/src/Entity/Project.php b/src/Entity/Project.php index 0183078..6a5afcd 100644 --- a/src/Entity/Project.php +++ b/src/Entity/Project.php @@ -43,7 +43,7 @@ class Project #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] - #[Groups(['project:read', 'time_entry:read', 'task:read', 'me:read'])] + #[Groups(['project:read', 'time_entry:read', 'task:read', 'me:read', 'user:list'])] private ?int $id = null; #[ORM\Column(length: 10, unique: true)] @@ -53,7 +53,7 @@ class Project private ?string $code = null; #[ORM\Column(length: 255)] - #[Groups(['project:read', 'project:write', 'time_entry:read', 'task:read', 'me:read'])] + #[Groups(['project:read', 'project:write', 'time_entry:read', 'task:read', 'me:read', 'user:list'])] private ?string $name = null; #[ORM\Column(type: 'text', nullable: true)]