Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[WebProfilerBundle] Change incorrect check for thestateless request attribute#57679
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
We only want to use the session if the request is **not** `stateless`. The old code used the sesison only in `stateless` requests (so requests not intended to use the session (=state) at all).
carsonbot commentedJul 8, 2024
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
xabbuh left a comment
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.
LGTM
stateless request attributestateless request attributenicolas-grekas commentedJul 9, 2024
Thank you@themasch. |
When upgrading our project from 5.4 to 6.4 (yep..we're late) we encountered an "Session was used while the request was declared stateless." exception when opening the profiler. Our
mainfirewall setsstateless: trueas its only used for API requests (and the profiler). Debugging to find what caused the session to be initialized I ended up in theProfilerController::searchBarAction, which gets the sessiononly if the_statelessattribute istrue.According to my understanding an the discussion herehttps://github.com/symfony/symfony/pull/50218/files#r1668401248 this seems to be incorrect.
We only want to use the session if the request isnot
stateless.