Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Profiler respect stateless attribute#50218

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

Merged

Conversation

@alamirault
Copy link
Contributor

@alamiraultalamirault commentedMay 2, 2023
edited
Loading

QA
Branch?6.3
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#50037
LicenseMIT
Doc PRsymfony/symfony-docs#...

Now that#50198 forward_stateless attribute in fragments, this PR check this attribute and make profiler stateless when is required.

I don't know which tests I have to add because session is not checked. (I checked on reproducer and it's ok)

@carsonbotcarsonbot added this to the5.4 milestoneMay 2, 2023
@alamiraultalamirault changed the title[WebPorfilerBundle] Profiler respect stateless attribute[WebProfilerBundle] Profiler respect stateless attributeMay 2, 2023
@MatTheCat
Copy link
Contributor

#50198 was a new feature so it is only available on the 6.3 branch 😅

I looked for a way to test this and it seems we have to updateWebProfilerBundleKernel to allow configuring the debug mode.

Copy link
Member

@stofstof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This should be done in 6.3 IMO as it relies on the previous PR that is merged in 6.3

@alamiraultalamiraultforce-pushed thehotfix/50037-stateless-profiler branch froma763930 to7820776CompareMay 3, 2023 17:59
@alamiraultalamirault changed the base branch from5.4 to6.3May 3, 2023 17:59
@alamiraultalamirault requested a review fromstofMay 3, 2023 18:00
@carsonbotcarsonbot changed the title[WebProfilerBundle] Profiler respect stateless attributeProfiler respect stateless attributeMay 4, 2023
@fabpotfabpot modified the milestones:5.4,6.3May 5, 2023
@fabpot
Copy link
Member

Thank you@alamirault.

$session =$request->hasSession() ?$request->getSession() :null;

$session =null;
if ($request->attributes->getBoolean('_stateless') &&$request->hasSession()) {
Copy link
Contributor

@themaschthemaschJul 8, 2024
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I know I am late, but I thought posting it here was less interruptive then creating a new issue or discussion for this question:

The PR touches 3 placed where it gets the session and adds checks for the_stateless request attribute.
Two checks check for!stateless && hasSession while one of them (insearchBarAction) checks forstateless && hasSession (without the!).

I found this while debugging for what startsSession was used while the request was declared stateless. when calling the profiler. As far as I can tell, the only place using the session there is the this spot.

This line looks incorret to me, I think its missing the! in front. But since I'm probably wrong (since this is like this for a year now, with no one noticing) I'd like to learn why I am wrong!

Copy link
Contributor

@MatTheCatMatTheCatJul 8, 2024
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just tested and you’re not wrong. Maybe you really are the first to notice 😅

themasch reacted with laugh emoji
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

If I understand the implications of this correct, then that means that for users that havestateless: false, restoring the search bar state from session should not work, as it would not use the session in those cases. It would only use the session ifstateless: true (e.g. when there should be no session). Correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

for users that havestateless: false, restoring the search bar state from session should not work

Yes, that also includes users who did not set_stateless. Are you up for a PR? Looks like you already know the fix!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I can give it a try:#57679
Hope thats correct so far.

MatTheCat reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@stofstofstof approved these changes

@lyrixxlyrixxAwaiting requested review from lyrixx

@ycerutoycerutoAwaiting requested review from yceruto

@wouterjwouterjAwaiting requested review from wouterj

@chalasrchalasrAwaiting requested review from chalasr

@dunglasdunglasAwaiting requested review from dunglas

@OskarStarkOskarStarkAwaiting requested review from OskarStark

@xabbuhxabbuhAwaiting requested review from xabbuh

+2 more reviewers

@themaschthemaschthemasch left review comments

@MatTheCatMatTheCatMatTheCat left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

[WebProfilerBundle] Profiler is not stateless

6 participants

@alamirault@MatTheCat@fabpot@themasch@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp