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

Breaking change for v1.8.0 #118

Closed
tobytwigger opened this issue Sep 4, 2020 · 11 comments · Fixed by #121
Closed

Breaking change for v1.8.0 #118

tobytwigger opened this issue Sep 4, 2020 · 11 comments · Fixed by #121

Comments

@tobytwigger
Copy link

Hi all! I'm not sure what's considered the public API of this package, but the most recent update has broken the socialiteproviders/providers package which allows social logins in Laravel. It'll also have broken any custom OAuth providers which extend the League\OAuth1\Client\Server\Server class, due to the typehinting of the methods.

In this particular case, it's made more problematic by the fact that Laravel socialite defines its own user to return, so the typehintinh for getUserDetails cannot be met without changes in several repositories.

Was this release meant as a minor release, or should it be upgraded to a major to stop any existing extensions being broken?

@bencorlett
Copy link
Member

bencorlett commented Sep 4, 2020 via email

@tobytwigger
Copy link
Author

Thank you! I think the reasoning was that the user model is used for OAuth2 too. Either way, a major version change will give time to fix this before upgrading - thanks! :)

bencorlett added a commit that referenced this issue Sep 4, 2020
@bencorlett
Copy link
Member

@tobytwigger would you be able to help test this for me? If so, could you add:

"league/oauth1-client": "dev-fix/revert-public-api"

To your composer.json and run composer update?

@bencorlett
Copy link
Member

Here's a comparison between 1.7 and the fix branch. I think it all looks good, it's passing unit tests, linting and static analysis. A real world test would be great though and I will push out 1.8.1 with this.

@tobytwigger
Copy link
Author

tobytwigger commented Sep 4, 2020

@bencorlett Just tested with our Laravel app using socialite, all working perfectly!

@bencorlett
Copy link
Member

@bencorlett Just tested with our Laravel app using socialite, all working perfectly!

Great! Thank you. This was a big oversight on my part and I really wanted to resolve this quickly. I've done some more testing on my end and I'm pretty comfortable it's looking good.

I'll be pushing v1.8.1 shortly with this in it :)

@tobytwigger
Copy link
Author

Thanks a lot!

@bencorlett
Copy link
Member

You're welcome. Thanks for pointing the issue out and helping resolve it :)

I'm just waiting on builds to pass then I'll tag up v1.8.1.

@shehi
Copy link

shehi commented Sep 6, 2020

That's why it shouldn't have been 1.8 release but 2.0 release, to avoid BC implications 🤦 Now all that work done towards PHP 7.1-7.2 was undone, and twice at that.

@bencorlett
Copy link
Member

That's why it shouldn't have been 1.8 release but 2.0 release, to avoid BC implications 🤦 Now all that work done towards PHP 7.1-7.2 was undone, and twice at that.

🤦‍♂️🤣👍👍

v2.0 (develop) is a rewrite. It took about 25 minutes to add php 7.1+ Language features to v1.8 and less to revert it, so I’m not too worried.

I am not interested in releasing 2.0, then 3.0 a few days later, I think this would not be worth the overhead.

@thephpleague thephpleague locked and limited conversation to collaborators Sep 6, 2020
@thephpleague thephpleague unlocked this conversation Sep 6, 2020
@bencorlett
Copy link
Member

@shehi i should add - do let me know your thoughts on v2 - I’d appreciate that.

I will be documenting it shortly and polishing it up!

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 a pull request may close this issue.

3 participants