Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.5] Policy stub fixes: correct User model & var name for UserPolicy #21499

Merged
merged 1 commit into from
Oct 2, 2017
Merged

[5.5] Policy stub fixes: correct User model & var name for UserPolicy #21499

merged 1 commit into from
Oct 2, 2017

Conversation

tzurbaev
Copy link
Contributor

@tzurbaev tzurbaev commented Oct 2, 2017

Currently, User $user argument in Policy stub does not respect auth.providers.users.model config value. This PR replaces default User model typehint with correct one from auth config (DummyUser in policy stub).

Also, generated policy for User model have duplicate $user variable in methods signature (one for authenticated user & one for poilcy model instance).

With this change policy for User models will be generated with (User $user, User $model) signatures instead of (User $user, User $user).

Currently, `User $user` argument in Policy stub does not respect `auth.providers.users.model` config value. Also, `$user` variable used twice when generating Policy for User class.
@Lloople
Copy link
Contributor

Lloople commented Oct 2, 2017

Have you checked the use statement of the stub?

I though I fixed it with this pull-reques😅

#19965

@taylorotwell taylorotwell merged commit f256407 into laravel:5.5 Oct 2, 2017
@tzurbaev tzurbaev deleted the patch-1 branch October 3, 2017 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants