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

[7.0] Change server Property type in CheckClientCredentialForAnyScope #1034

Merged
merged 1 commit into from
Jul 2, 2019
Merged

Conversation

alshf89
Copy link
Contributor

@alshf89 alshf89 commented Jul 1, 2019

I change declaration $server property in CheckClientCredentialForAnyScope from private to protected, this is useful if anyone wants to extends this middleware.

@driesvints
Copy link
Member

driesvints commented Jul 2, 2019

Unfortunately this is a breaking change if anyone is overwriting the property: https://3v4l.org/i7s5h

Edit: but I sincerely doubt it that anyone is doing that 🤷‍♂

@driesvints driesvints changed the title Change server Property type in CheckClientCredentialForAnyScope [7.0] Change server Property type in CheckClientCredentialForAnyScope Jul 2, 2019
@alshf89
Copy link
Contributor Author

alshf89 commented Jul 2, 2019

I think if someone wants to overwrite the property they must use another name and use dependency injection and service container to assign League\OAuth2\Server\ResourceServer object to that property.

and why should they overwrite it when they can access it from parent class ?

Actually I wanted to extend my custom middleware with CheckClientCredentialForAnyScope and needed server Property to do something in my extended middleware. but I cant cuz it is private.

currently I can extend CheckClientCredential middleware because it has protected server property.

@taylorotwell taylorotwell merged commit b4cc188 into laravel:7.0 Jul 2, 2019
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