From e0e7e75c94c1cba4beab6b0715f4670c4cdaf8f5 Mon Sep 17 00:00:00 2001 From: Sergio Brighenti Date: Sun, 7 Jan 2024 22:30:58 +0100 Subject: [PATCH] Write the property name --- src/Resolver/EnumOrScalar.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Resolver/EnumOrScalar.php b/src/Resolver/EnumOrScalar.php index bdb4eb0..7bb2129 100644 --- a/src/Resolver/EnumOrScalar.php +++ b/src/Resolver/EnumOrScalar.php @@ -50,7 +50,8 @@ public function resolve(string $propertyName, array $propertyTypes, array $data) throw new UnsupportedPropertyTypeException( sprintf( - 'This property can be %s or %s, %s given.', + 'The property "%s" can only be %s or %s, %s given.', + $propertyName, $enumClass, implode(' or ', $propertyTypes), $valueType