Skip to content

Commit

Permalink
Fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
ottaviano committed Apr 16, 2019
1 parent 2e6e12c commit 79695a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Resources/config/dbal.xml
Expand Up @@ -7,7 +7,6 @@
<parameters>
<parameter key="doctrine.dbal.logger.chain.class">Doctrine\DBAL\Logging\LoggerChain</parameter>
<parameter key="doctrine.dbal.logger.profiling.class">Doctrine\DBAL\Logging\DebugStack</parameter>
<parameter key="doctrine.dbal.logger.backtrace.class">Doctrine\DBAL\Logging\BacktraceLogger</parameter>
<parameter key="doctrine.dbal.logger.class">Symfony\Bridge\Doctrine\Logger\DbalLogger</parameter>
<parameter key="doctrine.dbal.configuration.class">Doctrine\DBAL\Configuration</parameter>
<parameter key="doctrine.data_collector.class">Doctrine\Bundle\DoctrineBundle\DataCollector\DoctrineDataCollector</parameter>
Expand All @@ -31,7 +30,7 @@
</service>

<service id="doctrine.dbal.logger.profiling" class="%doctrine.dbal.logger.profiling.class%" public="false" abstract="true" />
<service id="doctrine.dbal.logger.backtrace" class="%doctrine.dbal.logger.backtrace.class%" public="false" abstract="true" />
<service id="doctrine.dbal.logger.backtrace" class="Doctrine\DBAL\Logging\BacktraceLogger" public="false" abstract="true" />

<service id="doctrine.dbal.logger" class="%doctrine.dbal.logger.class%" public="false">
<tag name="monolog.logger" channel="doctrine" />
Expand Down
14 changes: 9 additions & 5 deletions Resources/views/Collector/db.html.twig
Expand Up @@ -257,7 +257,7 @@

{% if query.backtrace is defined %}
&nbsp;&nbsp;
<a href="#" class="sf-toggle link-inverse" data-toggle-selector="#backtrace-query-{{ i }}-{{ loop.parent.loop.index }}" data-toggle-alt-content="Hide query backtrace">View query backtrace</a>
<a href="#" class="sf-toggle link-inverse" data-toggle-selector="#backtrace-{{ i }}-{{ loop.parent.loop.index }}" data-toggle-alt-content="Hide query backtrace">View query backtrace</a>
{% endif %}
</div>

Expand All @@ -274,10 +274,10 @@
{% endif %}

{% if query.backtrace is defined %}
<div id="backtrace-query-{{ i }}-{{ loop.parent.loop.index }}" class="hidden">
<div id="backtrace-{{ i }}-{{ loop.parent.loop.index }}" class="hidden">
<table>
<thead>
<tr >
<tr>
<th scope="col">#</th>
<th scope="col">File/Call</th>
</tr>
Expand All @@ -292,8 +292,12 @@
{% set file_path = trace.file|format_file(line_number)|striptags|replace({ (' at line ' ~ line_number): '' }) %}
{% set file_path_parts = file_path|split(constant('DIRECTORY_SEPARATOR')) %}

{{ file_path_parts[:-1]|join(constant('DIRECTORY_SEPARATOR')) }}{{ constant('DIRECTORY_SEPARATOR') }}<strong>{{ file_path_parts|last }}</strong>
{{- trace.type }}<span class="status-warning">{{ trace.function }}</span> (line {{ line_number }})
{{- file_path_parts[:-1]|join(constant('DIRECTORY_SEPARATOR')) -}}
{{- constant('DIRECTORY_SEPARATOR') -}}
<strong>{{ file_path_parts|last }}</strong>
{{- trace.type ?? '::' -}}
<span class="status-warning">{{ trace.function }}</span>
(line {{ line_number }})
</span>
</td>
</tr>
Expand Down

0 comments on commit 79695a3

Please sign in to comment.