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
We are in the processing of upgrading an existing application from Laravel 5.8 to Laravel 6.0, and in the process have upgraded Sentinel from 2.0 to 3.0. Our user model uses a UUID, handled as a string, as its primary key.
Expected behaviour
Sentinel::findById() should accept a string ID.
Actual behaviour
The following error is thrown:
Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Argument 1 passed to Cartalyst\Sentinel\Users\IlluminateUserRepository::findById() must be of the type int, string given"
Steps to reproduce
As above.
I can see that Sentinel 3.0 introduced type-hinting in a number of places which seems to be the root cause of this issue, and I can see that there's an outstanding PR #529 that is related to this. Is there any plan to support UUIDs in future? Is there a way to work around this issue short of forking the repo and removing the type hints?
The text was updated successfully, but these errors were encountered:
Your Environment
Background
We are in the processing of upgrading an existing application from Laravel 5.8 to Laravel 6.0, and in the process have upgraded Sentinel from 2.0 to 3.0. Our user model uses a UUID, handled as a string, as its primary key.
Expected behaviour
Sentinel::findById() should accept a string ID.
Actual behaviour
The following error is thrown:
Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Argument 1 passed to Cartalyst\Sentinel\Users\IlluminateUserRepository::findById() must be of the type int, string given"
Steps to reproduce
As above.
I can see that Sentinel 3.0 introduced type-hinting in a number of places which seems to be the root cause of this issue, and I can see that there's an outstanding PR #529 that is related to this. Is there any plan to support UUIDs in future? Is there a way to work around this issue short of forking the repo and removing the type hints?
The text was updated successfully, but these errors were encountered: