symfony/symfony — pull request #6819 by michelsalib (2013-01-21 10:23:38+00:00)
Title: Registering logout listeners at the end

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6751
| License | MIT
| Doc PR | n/a

The current logout listener listens to the same event as the login from the other listeners.
When login out, the logout listener is currently called first, and because the token is not in the security context, it is skipped. Afterwards, the other listeners are called and populate the security context with a token.
Registering the logout listeners after everything else fixes the issue.