8000 bug #22928 [WebProfilerBundle] Fixed options stub values display in f… · symfony/symfony@df7fe48 · GitHub
[go: up one dir, main page]

Skip to content

Commit df7fe48

Browse files
bug #22928 [WebProfilerBundle] Fixed options stub values display in form profiler (HeahDude)
This PR was merged into the 3.3 branch. Discussion ---------- [WebProfilerBundle] Fixed options stub values display in form profiler | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ Since 3.3 and #21638, serializing form options gives either a `CutStub` instance or a simple var, ref ab716c6#diff-78ea21636d0319e1c804ccc1a33f68f3R271. This breaks the form profiler panel. Commits ------- 5e6b3a5 Fixed options stub values display in form profiler
2 parents a80348b + 5e6b3a5 commit df7fe48

File tree

1 file changed

+4
-1
lines changed
  • src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector

1 file changed

+4
-1
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,10 @@
624624
<th>{{ option }}</th>
625625
<td>{{ profiler_dump(value) }}</td>
626626
<td>
627-
{% if data.resolved_options[option] == value %}
627+
{# values can be stubs #}
628+
{% set option_value = value.value|default(value) %}
629+
{% set resolved_option_value = data.resolved_options[option].value|default(data.resolved_options[option]) %}
630+
{% if resolved_option_value == option_value %}
628631
<em class="font-normal text-muted">same as passed value</em>
629632
{% else %}
630633
{{ profiler_dump(data.resolved_options[option]) }}

0 commit comments

Comments
 (0)
0