-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Deprecate LogoutListener being returned as 3rd element by FirewallMapInterface::getListeners #43674
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
Conversation
690b40c
to
913a9c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, Christian! I have some concerns with the current BC layer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some comments, but the 2nd one might not be relevant after @stof's comments (which I agree with: the current deprecation layer should be improved)
@scheb Do you think you can work on this one soon? We are closing 5.4 for new features. |
I got time this weekend! My suggestion would be to combine adding the new methods (as discussed here) with the changes from #43548 and target 5.4. With new methods added and the existing method becoming deprecated, it should be possible to do it all at once within the 5.4 release. |
913a9c4
to
982d79f
Compare
Force-pushed a draft to deprecate Considerations:
|
To me it is, yes 👍 .
We cannot remove them as these classes are not marked as internal. We need to deprecate these constructor parameters first (happy to help with the BC layer.)
Indeed. |
@chalasr Ok, that was what I was afraid of 😟. For derprecating arguments at the end of the argument list it's easy, make it optional and trigger deprecation warning when it's set. Though for arguments in between I'm not really sure how to proceed. Can you point me to an example how to approach this? We could also have a chat on Slack, since that works better for back and forth comms. |
See e.g:
Basically:
|
982d79f
to
50b7a99
Compare
So here's a suggestion. The fabbot.io failing seems to be unrelated to my changes. Considerations:
|
Let me close here as I think that while cleanups are welcome, this one is hard (with BC implications) for little practical benefit. 3 years passed also :) |
As discussed with @chalasr, I'm adding these deprecations in preparation for #43548, which is targeting Symfony 6.0.
What's this PR about?
The 3rd element in the array returned by
FirewallMapInterface::getListeners()
containing theLogoutListener
will be deprecated. Instead, in Symfony 6.0 the logout listener will be included in the first element, which is then containing all firewall listeners and removing some unnecessary complexity (-> #43548).This change is a follow-up of introducing the ability to sort security listeners, which was introduced in #37337. There is no longer the need for treating the
LogoutListener
as a special case to get its execution order right.