[WebProfilerBundle] Fixed error from unset twig variable#18457
[WebProfilerBundle] Fixed error from unset twig variable#18457simonsargeant wants to merge 2 commits intosymfony:2.8from
Conversation
|
@simonsargeant thanks for fixing this. It looks good to me 👍 However, there is a big problem with the code we use for this: {% if 'n/a' != collector.debug %}
...
{% endif %}
Should we fix that in this PR or create a new PR? |
|
@javiereguiluz do we actually need the color here ? |
|
@stof I don't have a strong opinion about this. But the color may be consistent with other colored blocks in that panel and it doesn't hurt:
|
|
@javiereguiluz I think this is now expected behavior as collector.debug could be boolean or 'n/a' https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php#L69. Does not show the debug status if 'n/a', shows activated or deactivated if true or false. |
|
@simonsargeant yes, the collector can be
So the only scenario where this is |
|
@javiereguiluz Sorry, I meant I had updated the PR so the behaviour is now:
|
|
👍 Thanks @simonsargeant |
|
👍 |
|
Thank you @simonsargeant. |
…simonsargeant) This PR was squashed before being merged into the 2.8 branch (closes #18457). Discussion ---------- [WebProfilerBundle] Fixed error from unset twig variable | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR 8000 | n/a Minor bug, fixes error from twig variable which was removed in 2.8 Here was where it was originally set https://github.com/symfony/symfony/blob/2.7/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig#L69 Replaced with expected class name Commits ------- 3e2c4c9 [WebProfilerBundle] Fixed error from unset twig variable
…iable (simonsargeant) This PR was squashed before being merged into the 2.8 branch (closes symfony#18457). Discussion ---------- [WebProfilerBundle] Fixed error from unset twig variable | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Minor bug, fixes error from twig variable which was removed in 2.8 Here was where it was originally set https://github.com/symfony/symfony/blob/2.7/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig#L69 Replaced with expected class name Commits ------- 3e2c4c9 [WebProfilerBundle] Fixed error from unset twig variable


Minor bug, fixes error from twig variable which was removed in 2.8
Here was where it was originally set https://github.com/symfony/symfony/blob/2.7/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig#L69
Replaced with expected class name