You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param list<string> $properties a list of properties this parameter applies to (works with the :property placeholder)
30
+
* @param list<string> $properties a list of properties this parameter applies to (works with the :property placeholder)
31
31
* @param FilterInterface|string|null $filter
32
-
* @param mixed $constraints an array of Symfony constraints, or an array of Laravel rules
33
-
* @param Type $nativeType the PHP native type, we cast values to an array if its a CollectionType, if not and it's an array with a single value we use it (eg: HTTP Header)
32
+
* @param mixed $constraints an array of Symfony constraints, or an array of Laravel rules
33
+
* @param Type $nativeType the PHP native type, we cast values to an array if its a CollectionType, if not and it's an array with a single value we use it (eg: HTTP Header)
34
+
* @param ?bool $castToNativeType whether API Platform should cast your parameter to the nativeType declared
35
+
* @param ?callable(mixed): mixed $castFn the closure used to cast your parameter, this gets called only when $castToNativeType is set
34
36
*/
35
37
publicfunction__construct(
36
38
protected ?string$key = null,
@@ -51,6 +53,8 @@ public function __construct(
51
53
protectedarray|string|null$filterContext = null,
52
54
protected ?Type$nativeType = null,
53
55
protected ?bool$castToArray = null,
56
+
protected ?bool$castToNativeType = null,
57
+
protectedmixed$castFn = null,
54
58
) {
55
59
}
56
60
@@ -332,4 +336,33 @@ public function withCastToArray(bool $castToArray): self
0 commit comments