From e9850fdb2eef24a17f1095bac3f9b4e0ff9a0f7e Mon Sep 17 00:00:00 2001 From: tristan Date: Mon, 6 Apr 2026 16:43:26 +0200 Subject: [PATCH] fix : correct Link uriVariables for environment POST endpoint Use toProperty + identifiers instead of fromProperty to resolve application slug correctly. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/Entity/Environment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Entity/Environment.php b/src/Entity/Environment.php index faaeeb4..1fc8e55 100644 --- a/src/Entity/Environment.php +++ b/src/Entity/Environment.php @@ -21,7 +21,7 @@ use Symfony\Component\Serializer\Attribute\Groups; new Post( uriTemplate: '/applications/{slug}/environments', uriVariables: [ - 'slug' => new Link(fromClass: Application::class, fromProperty: 'environments'), + 'slug' => new Link(toProperty: 'application', fromClass: Application::class, identifiers: ['slug']), ], security: "is_granted('ROLE_ADMIN')", ),