Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d482f0a

Browse files
committed
feature #28763 [WebProfilerBundle] Extract server parameters into their own tab (fabpot)
This PR was merged into the 4.2-dev branch. Discussion ---------- [WebProfilerBundle] Extract server parameters into their own tab | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes-ish | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | n/a As using env vars is important as of Symfony 4, I think they deserves their own tab under the request section. <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 8d47798 [WebProfilerBundle] extracted server parameters into their own tab
2 parents cbe2895 + 8d47798 commit d482f0a

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

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

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,6 @@
186186
<p>No content</p>
187187
</div>
188188
{% endif %}
189-
190-
<h3>Server Parameters</h3>
191-
<h4>Defined in .env</h4>
192-
{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.dotenvvars }, with_context = false) }}
193-
194-
<h4>Defined as regular env variables</h4>
195-
{% set requestserver = [] %}
196-
{% for key, value in collector.requestserver if key not in collector.dotenvvars.keys %}
197-
{% set requestserver = requestserver|merge({(key): value}) %}
198-
{% endfor %}
199-
{{ include('@WebProfiler/Profiler/table.html.twig', { data: requestserver }, with_context = false) }}
200189
</div>
201190
</div>
202191

@@ -278,6 +267,22 @@
278267
</div>
279268
</div>
280269

270+
<div class="tab">
271+
<h3 class="tab-title">Server Parameters</h3>
272+
<div class="tab-content">
273+
<h3>Server Parameters</h3>
274+
<h4>Defined in .env</h4>
275+
{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.dotenvvars }, with_context = false) }}
276+
277+
<h4>Defined as regular env variables</h4>
278+
{% set requestserver = [] %}
279+
{% for key, value in collector.requestserver if key not in collector.dotenvvars.keys %}
280+
{% set requestserver = requestserver|merge({(key): value}) %}
281+
{% endfor %}
282+
{{ include('@WebProfiler/Profiler/table.html.twig', { data: requestserver }, with_context = false) }}
283+
</div>
284+
</div>
285+
281286
{% if profile.parent %}
282287
<div class="tab">
283288
<h3 class="tab-title">Parent Request</h3>

0 commit comments

Comments
 (0)