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

Allow CompositeAuth auth methods to use their own user if defined #20308

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mtangoo
Copy link
Contributor

@mtangoo mtangoo commented Jan 13, 2025

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues #20238

@mtangoo mtangoo requested a review from a team January 13, 2025 16:50
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 64.84%. Comparing base (fd866da) to head (e9f7a54).

Files with missing lines Patch % Lines
framework/filters/auth/CompositeAuth.php 60.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20308      +/-   ##
============================================
- Coverage     64.84%   64.84%   -0.01%     
- Complexity    11424    11427       +3     
============================================
  Files           431      431              
  Lines         37172    37177       +5     
============================================
+ Hits          24106    24109       +3     
- Misses        13066    13068       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samdark samdark requested a review from bizley January 13, 2025 19:13
@bizley
Copy link
Member

bizley commented Jan 13, 2025

I see this was discussed and proposed to be changed in 2.2. Are we doing this in 2.0 anyway?

@samdark
Copy link
Member

samdark commented Jan 13, 2025

@bizley I don't see any compatibility issues with this change. Are there any?

@mtangoo
Copy link
Contributor Author

mtangoo commented Jan 14, 2025

I see this was discussed and proposed to be changed in 2.2. Are we doing this in 2.0 anyway?

I think in 2.2 there will be a need to look at the API design itself and if necessary make breaking change. This is a "painkiller" approach to just fix the issue without any breaking changes

@bizley
Copy link
Member

bizley commented Jan 14, 2025

With this change user set in the inner auth method will be used for it, now we are using user set in the composite auth.

@mtangoo
Copy link
Contributor Author

mtangoo commented Jan 14, 2025

With this change user set in the inner auth method will be used for it, now we are using user set in the composite auth.

Only if is set. Otherwise it works as it used to!

@bizley
Copy link
Member

bizley commented Jan 14, 2025

With this change user set in the inner auth method will be used for it, now we are using user set in the composite auth.

Only if is set. Otherwise it works as it used to!

Yes, but now even if user is set in one of the methods it is ignored.

@mtangoo
Copy link
Contributor Author

mtangoo commented Jan 14, 2025

With this change user set in the inner auth method will be used for it, now we are using user set in the composite auth.

Only if is set. Otherwise it works as it used to!

Yes, but now even if user is set in one of the methods it is ignored.

Isn't that the purpose of defining user in auth method, that you want it to override anything else defined?

@bizley
Copy link
Member

bizley commented Jan 14, 2025

With this change user set in the inner auth method will be used for it, now we are using user set in the composite auth.

Only if is set. Otherwise it works as it used to!

Yes, but now even if user is set in one of the methods it is ignored.

Isn't that the purpose of defining user in auth method, that you want it to override anything else defined?

I agree but this is BC break as was stated in #20238

@mtangoo
Copy link
Contributor Author

mtangoo commented Jan 14, 2025

I take it as a bug, because otherwise what is the point of an API allowing devs to pass user object of their choice if it ends up being discarded?

IMO, this is a bug that wasn't uncovered for so long.

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