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
this is forcing the $id to be an int, and when you swap to UUIDs this function is no longer usable. You can't even replace the implementation bc that would have to implement this contract as well
throws error:
Argument 1 passed to Spatie\\Permission\\Models\\Role::findById() must be of the type int, string given
The text was updated successfully, but these errors were encountered:
There are a half-dozen places where this is used, and all of those only fall findById if the value is integer/numeric.
I assume your reason for posting is that you've removed those integer/numeric filters in your code?
Changing the integer/numeric filter to allow strings would get confused with actual named permissions/roles. Assuming the (int) contract were changed, how were you envisioning preventing this confusion of uuid strings with role/permission name strings?
https://github.com/spatie/laravel-permission/blob/master/src/Contracts/Role.php#L38
this is forcing the
$id
to be an int, and when you swap to UUIDs this function is no longer usable. You can't even replace the implementation bc that would have to implement this contract as wellthrows error:
The text was updated successfully, but these errors were encountered: