-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebProfilerBundle] Try to display the most useful panel by default #33783
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
[WebProfilerBundle] Try to display the most useful panel by default #33783
Conversation
Personally I still prefer #32491 btw because the profile link is directly the right one, there is no special magic panel name. However, I recognize the implementation here is more straightforward and easier to understand / maintain. It was such a great alternative thinking idea! |
src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php
Outdated
Show resolved
Hide resolved
Question here: should we reserve a |
c0c34d6
to
66c5c12
Compare
If technically possible, my preference would be to guess when no param is passed. Otherwise, I'd prefer to rename |
@javiereguiluz it is totally possible, by dropping the default panel when getting the panel from the request, and then performing guessing when |
66c5c12
to
9690405
Compare
@stof Your idea looks good to me, I just updated the code. And at least there is no debate on the name 😁 |
6776a43
to
777110e
Compare
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.
I really like this approach, thank you!
There are some pending warnings https://travis-ci.org/symfony/symfony/jobs/591950102#L4498 |
3b1a977
to
7d94e29
Compare
Tests will need #33792 to pass. |
rebase unlocked, please apply the changes on src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php as I didn't merge them from 3.4 |
2e1af14
to
a0079a4
Compare
a0079a4
to
a45dd98
Compare
Done, failures are unrelated. |
Thank you @fancyweb. |
…el by default (fancyweb) This PR was merged into the 4.4 branch. Discussion ---------- [WebProfilerBundle] Try to display the most useful panel by default | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - Alternative to #32491, the goal stays the same. I think reserving a data collector name is fine, isn'it ? It's not likely that end users use this name (that's why I added an underscore) + shouldn't be hard for them to just rename it. I don't think adding a configuration option to toggle the "_best" behavior is useful, should be by default for DX IMHO. Not adding an extension point for now (for end users to set their panel as the "best"), maybe later if someone request it? Commits ------- a45dd98 [WebProfilerBundle] Try to display the most useful panel by default
Is there something that was changed here that would cause deprecation notices to stop getting displayed in the toolbar? I don't see any deprecation notices anywhere for anything since I upgraded an old project to symfony 4.4 and moved my configs over to the SF4 style. Or is there some hidden configuration setting somewhere that would tell symfony to silence deprecation notices? I rely heavily on those even internally when we deprecate our own features. |
Nope, this PR only changed the default displayed panel. This is not related to deprecation notices nor to the toolbar. |
Alternative to #32491, the goal stays the same.
I think reserving a data collector name is fine, isn'it ? It's not likely that end users use this name (that's why I added an underscore) + shouldn't be hard for them to just rename it.
I don't think adding a configuration option to toggle the "_best" behavior is useful, should be by default for DX IMHO.
Not adding an extension point for now (for end users to set their panel as the "best"), maybe later if someone request it?