Closed dereuromark closed 8 months ago
Currently it has the options
'map' => [], 'options' => [],
But I get
findUser(): Argument #2 ($uid) must be of type int, string given
With URL
/admin/profiles?uid=115
I guess the string '115' is never casted to int, the custom finder however is
public function findUser(SelectQuery $query, int $uid)
Sure, we can workaround it using
public function findUser(SelectQuery $query, int|string $uid)
But it seems a bit less clean than allowing
'cast' => [ 'field_name' => 'int', ],
or alike as additional option to cast the value accordingly before passing it on?
We cannot always control the (finder) code, or signature. Especially for BC reasons if there are types already set.
Currently it has the options
But I get
With URL
I guess the string '115' is never casted to int, the custom finder however is
Sure, we can workaround it using
But it seems a bit less clean than allowing
or alike as additional option to cast the value accordingly before passing it on?
We cannot always control the (finder) code, or signature. Especially for BC reasons if there are types already set.