[Security] Added a note regarding the loginUser() method
As @javiereguiluz stated, this method won't work for 100% of Symfony users. This is my case. I'm testing some protected API routes and the firewall is using a custom authenticator that relies on a custom header called "x-api-key". After spending hours trying to understand what I did wrong in my tests, I decided to dig into the code that defines the loginUser() method and noticed that it can only work with session-based authentication.
This little note could have saved me some time, so I believe it could help future users as well who are in the same case as me.
One test failed but I don't think it's related to the changes brought by this PR.
Thanks @artyuum and I'm sorry it took us so long to merge this.
No problem, thank you all for reviewing and merging.