-
Notifications
You must be signed in to change notification settings - Fork 84
[Hash] Improve user hash change detection during request by comparing at the end #543
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
[Hash] Improve user hash change detection during request by comparing at the end #543
Conversation
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.
this indeed looks better to me. am i right that previously if the user e.g. was logged out during the request, we would not have detected the hash change?
are we missing (unit) tests for some scenario? thinking of if we have a test that fails with the old implementation and would start to work with this change.
regarding phpunit versions: glad if you have some time to look into it - please do it in a separate pull request to not mix up with this change.
I think so yes, but besides some random report I don't know for sure if this is the cause or not, it just popped up when auditing the misc code involved as potential problem area.
probably, if you are ok with this change overall I'll try to find some time for tests in the next weeks |
yes, i do like the change and think it is cleaner than what we had. glad if you can look into a bit of testing to be sure we don't introduce a regression. |
On hold for #545 |
the build in master is fixed, can you please rebase this branch? |
eec6b70
to
b23c0a3
Compare
…mparing it at the end Fix and add test coverage for the PR.
b23c0a3
to
ec50558
Compare
Done, all tests green 🟢 Failure is on something not related to the changes here:
|
yep, that failure is known. its the doc build not working. i tried to fix it in FriendsOfSymfony/FOSHttpCache#450 but never found a solution unfortunately. |
thanks a lot! |
Regarding discussion on user hash change detection, this is what I had in mind:
! isAnonymous()
as a performance tweak => Still keep track of if user was logged in at request time, in case that changed in the meantimeTODO: