thephpleague / oauth2-client

Easy integration with OAuth 2.0 service providers.
http://oauth2-client.thephpleague.com
MIT License
3.64k stars 751 forks source link

getResourceOwner parameter type #956

Open nrob81 opened 2 years ago

nrob81 commented 2 years ago

Hello,

Doesn't would be better to set the type of the $token parameter here to AccessTokenInterface instead of AccessToken?

https://github.com/thephpleague/oauth2-client/blob/8c7498c14959b98d4143a8ef91e895f353381628/src/Provider/AbstractProvider.php#L765

what do you think? Thanks

esolitos commented 2 years ago

While you are absolutely correct: it would be better to expect Interfaces and not specific implementations, it is to consider that this small change would require a new major release because it would break bacward compatibility, as it happened in the past (ref #753 and #752 for example).

And I highly doubt a new major release will be created only for this alone.

Edit: as a matter of fact this is already being tracked in #897 :)