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

Conversation

Projects
None yet
3 participants
@tzurbaev
Contributor

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).

Fix User model typehints & `$user` variable duplicates in Policy stub;
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

This comment has been minimized.

Show comment
Hide comment
@Lloople

Lloople Oct 2, 2017

Contributor

Have you checked the use statement of the stub?

I though I fixed it with this pull-reques😅

#19965

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

2 checks passed

continuous-integration/styleci/pr The StyleCI analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@tzurbaev tzurbaev deleted the tzurbaev:patch-1 branch Oct 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment