You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug symfony#57679 [WebProfilerBundle] Change incorrect check for the stateless request attribute (themasch)
This PR was merged into the 6.4 branch.
Discussion
----------
[WebProfilerBundle] Change incorrect check for the `stateless` request attribute
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no
| Issues |
| License | MIT
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 `main` firewall sets `stateless: true` as its only used for API requests (and the profiler). Debugging to find what caused the session to be initialized I ended up in the `ProfilerController::searchBarAction`, which gets the session *only if the `_stateless` attribute is `true`*.
According to my understanding an the discussion here https://github.com/symfony/symfony/pull/50218/files#r1668401248 this seems to be incorrect.
We only want to use the session if the request is **not** `stateless`.
Commits
-------
92093b9 Change incorrect check for the `stateless` request attribute
0 commit comments