From d67102ed7b729869d69d7018bbeb0f3b2836a117 Mon Sep 17 00:00:00 2001 From: soyuka Date: Mon, 8 Jul 2024 10:07:52 +0200 Subject: [PATCH] fix: parameter not found when no value --- src/Metadata/Parameter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Metadata/Parameter.php b/src/Metadata/Parameter.php index 88dc06fd5fc..be68bc03412 100644 --- a/src/Metadata/Parameter.php +++ b/src/Metadata/Parameter.php @@ -14,6 +14,7 @@ namespace ApiPlatform\Metadata; use ApiPlatform\OpenApi; +use ApiPlatform\State\ParameterNotFound; use ApiPlatform\State\ParameterProviderInterface; use Symfony\Component\Validator\Constraint; @@ -107,7 +108,7 @@ public function getConstraints(): Constraint|array|null */ public function getValue(): mixed { - return $this->extraProperties['_api_values'] ?? null; + return $this->extraProperties['_api_values'] ?? new ParameterNotFound(); } /**