Skip to content

Declare the position of TwoFactorAccessListener with #[FirewallListenerOrder] - #325

Merged
scheb merged 1 commit into
scheb:sf-8.2from
nicolas-grekas:firewall-listener-order
Oct 13, 2026
Merged

scheb merged 1 commit into
scheb:sf-8.2from
nicolas-grekas:firewall-listener-order

Conversation

@nicolas-grekas

@nicolas-grekas nicolas-grekas commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Symfony 8.2 adds #[FirewallListenerOrder] (symfony/symfony#66718) to declare the firewall listeners a listener runs before or after. This turns the comment in getPriority() into a check: the priority stays -191 so nothing moves, but the container will fail to compile if Symfony's priorities ever stop matching it.

Older Symfony versions ignore the attribute.

@scheb

scheb commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Will getPriority eventually get removed?

@nicolas-grekas

Copy link
Copy Markdown
Contributor Author

Nope, it's still the main mechanism, the before/after is extra rules on top.

@scheb

scheb commented Oct 10, 2026

Copy link
Copy Markdown
Owner

@nicolas-grekas Would you please rebase and re-target the PR to the sf-8.2 branch, which has a build against Symfony 8.2 development versions configured. Thanks!

@nicolas-grekas
nicolas-grekas force-pushed the firewall-listener-order branch from 6db9c46 to 907c92c Compare October 10, 2026 16:17
@nicolas-grekas
nicolas-grekas changed the base branch from 8.x to sf-8.2 October 10, 2026 16:18
@nicolas-grekas

Copy link
Copy Markdown
Contributor Author

Done!

@scheb
scheb merged commit 73fcde0 into scheb:sf-8.2 Oct 13, 2026
13 checks passed
@scheb

scheb commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Excellent, thanks! 🙇

@nicolas-grekas
nicolas-grekas deleted the firewall-listener-order branch October 13, 2026 17:56
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.

2 participants