Update
After detailed investigation and consultation with some experts, it occurred to me, that idea of destroying sessions is an incorrect one. The better question would be — «How to force all users to log out».
And this problem should be solved not from the session perspective, which is a pretty low-level mechanism, but from the Security Component one. Even if you delete all session data, it will be re-created by means of remember me
cookies with the next user requests.
I will try to present the valid solution to this problem later on.
The question
I need to implement a feature of so-called application «lockdown», so I need a way to log all users out of Symfony 2 application (close all active sessions).
What is the best way to achieve this functionality?
Ideally, the solution should be fully compatible with all possible save-handlers.
It looks like SessionHandlerInterface
doesn't provide a method to do so.