config.html.twig 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. {% extends '@WebProfiler/Profiler/layout.html.twig' %}
  2. {% block toolbar %}
  3. {% if 'unknown' == collector.symfonyState %}
  4. {% set block_status = '' %}
  5. {% set symfony_version_status = 'Unable to retrieve information about the Symfony version.' %}
  6. {% elseif 'eol' == collector.symfonyState %}
  7. {% set block_status = 'red' %}
  8. {% set symfony_version_status = 'This Symfony version will no longer receive security fixes.' %}
  9. {% elseif 'eom' == collector.symfonyState %}
  10. {% set block_status = 'yellow' %}
  11. {% set symfony_version_status = 'This Symfony version will only receive security fixes.' %}
  12. {% elseif 'dev' == collector.symfonyState %}
  13. {% set block_status = 'yellow' %}
  14. {% set symfony_version_status = 'This Symfony version is still in the development phase.' %}
  15. {% else %}
  16. {% set block_status = '' %}
  17. {% set symfony_version_status = '' %}
  18. {% endif %}
  19. {% set icon %}
  20. <span class="sf-toolbar-label">
  21. {{ include('@WebProfiler/Icon/symfony.svg') }}
  22. </span>
  23. <span class="sf-toolbar-value">{{ collector.symfonyState is defined ? collector.symfonyversion : 'n/a' }}</span>
  24. {% endset %}
  25. {% set text %}
  26. <div class="sf-toolbar-info-group">
  27. <div class="sf-toolbar-info-piece">
  28. <b>Profiler token</b>
  29. <span>
  30. {% if profiler_url %}
  31. <a href="{{ profiler_url }}">{{ collector.token }}</a>
  32. {% else %}
  33. {{ collector.token }}
  34. {% endif %}
  35. </span>
  36. </div>
  37. {% if 'n/a' is not same as(collector.env) %}
  38. <div class="sf-toolbar-info-piece">
  39. <b>Environment</b>
  40. <span>{{ collector.env }}</span>
  41. </div>
  42. {% endif %}
  43. {% if 'n/a' is not same as(collector.debug) %}
  44. <div class="sf-toolbar-info-piece">
  45. <b>Debug</b>
  46. <span class="sf-toolbar-status sf-toolbar-status-{{ collector.debug ? 'green' : 'red' }}">{{ collector.debug ? 'enabled' : 'disabled' }}</span>
  47. </div>
  48. {% endif %}
  49. </div>
  50. <div class="sf-toolbar-info-group">
  51. <div class="sf-toolbar-info-piece sf-toolbar-info-php">
  52. <b>PHP version</b>
  53. <span{% if collector.phpversionextra %} title="{{ collector.phpversion ~ collector.phpversionextra }}"{% endif %}>
  54. {{ collector.phpversion }}
  55. &nbsp; <a href="{{ path('_profiler_phpinfo') }}">View phpinfo()</a>
  56. </span>
  57. </div>
  58. <div class="sf-toolbar-info-piece sf-toolbar-info-php-ext">
  59. <b>PHP Extensions</b>
  60. <span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasxdebug ? 'green' : 'gray' }}">xdebug {{ collector.hasxdebug ? '✓' : '✗' }}</span>
  61. <span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasapcu ? 'green' : 'gray' }}">APCu {{ collector.hasapcu ? '✓' : '✗' }}</span>
  62. <span class="sf-toolbar-status sf-toolbar-status-{{ collector.haszendopcache ? 'green' : 'red' }}">OPcache {{ collector.haszendopcache ? '✓' : '✗' }}</span>
  63. </div>
  64. <div class="sf-toolbar-info-piece">
  65. <b>PHP SAPI</b>
  66. <span>{{ collector.sapiName }}</span>
  67. </div>
  68. </div>
  69. <div class="sf-toolbar-info-group">
  70. {% if collector.symfonyversion is defined %}
  71. <div class="sf-toolbar-info-piece">
  72. <b>Resources</b>
  73. <span>
  74. <a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">
  75. Read Symfony {{ collector.symfonyversion }} Docs
  76. </a>
  77. </span>
  78. </div>
  79. <div class="sf-toolbar-info-piece">
  80. <b>Help</b>
  81. <span>
  82. <a href="https://symfony.com/support">
  83. Symfony Support Channels
  84. </a>
  85. </span>
  86. </div>
  87. {% endif %}
  88. </div>
  89. {% endset %}
  90. {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: true, name: 'config', status: block_status, additional_classes: 'sf-toolbar-block-right', block_attrs: 'title="' ~ symfony_version_status ~ '"' }) }}
  91. {% endblock %}
  92. {% block menu %}
  93. <span class="label label-status-{{ collector.symfonyState == 'eol' ? 'red' : collector.symfonyState in ['eom', 'dev'] ? 'yellow' : '' }}">
  94. <span class="icon">{{ include('@WebProfiler/Icon/config.svg') }}</span>
  95. <strong>Configuration</strong>
  96. </span>
  97. {% endblock %}
  98. {% block panel %}
  99. <h2>Symfony Configuration</h2>
  100. <div class="metrics">
  101. <div class="metric">
  102. <span class="value">{{ collector.symfonyversion }}</span>
  103. <span class="label">Symfony version</span>
  104. </div>
  105. {% if 'n/a' != collector.env %}
  106. <div class="metric">
  107. <span class="value">{{ collector.env }}</span>
  108. <span class="label">Environment</span>
  109. </div>
  110. {% endif %}
  111. {% if 'n/a' != collector.debug %}
  112. <div class="metric">
  113. <span class="value">{{ collector.debug ? 'enabled' : 'disabled' }}</span>
  114. <span class="label">Debug</span>
  115. </div>
  116. {% endif %}
  117. </div>
  118. {% set symfony_status = { dev: 'Unstable Version', stable: 'Stable Version', eom: 'Maintenance Ended', eol: 'Version Expired' } %}
  119. {% set symfony_status_class = { dev: 'warning', stable: 'success', eom: 'warning', eol: 'error' } %}
  120. <table>
  121. <thead class="small">
  122. <tr>
  123. <th>Symfony Status</th>
  124. <th>Bugs {{ collector.symfonystate in ['eom', 'eol'] ? 'were' : 'are' }} fixed until</th>
  125. <th>Security issues {{ collector.symfonystate == 'eol' ? 'were' : 'are' }} fixed until</th>
  126. <th></th>
  127. </tr>
  128. </thead>
  129. <tbody>
  130. <tr>
  131. <td class="font-normal">
  132. <span class="label status-{{ symfony_status_class[collector.symfonystate] }}">{{ symfony_status[collector.symfonystate]|upper }}</span>
  133. {% if collector.symfonylts %}
  134. &nbsp; <span class="label status-success">Long-Term Support</span>
  135. {% endif %}
  136. </td>
  137. <td class="font-normal">{{ collector.symfonyeom }}</td>
  138. <td class="font-normal">{{ collector.symfonyeol }}</td>
  139. <td class="font-normal">
  140. <a href="https://symfony.com/releases/{{ collector.symfonyminorversion }}#release-checker">View roadmap</a>
  141. </td>
  142. </tr>
  143. </tbody>
  144. </table>
  145. <h2>PHP Configuration</h2>
  146. <div class="metrics">
  147. <div class="metric">
  148. <span class="value">{{ collector.phpversion }}{% if collector.phpversionextra %} <span class="unit">{{ collector.phpversionextra }}</span>{% endif %}</span>
  149. <span class="label">PHP version</span>
  150. </div>
  151. <div class="metric">
  152. <span class="value">{{ collector.phparchitecture }} <span class="unit">bits</span></span>
  153. <span class="label">Architecture</span>
  154. </div>
  155. <div class="metric">
  156. <span class="value">{{ collector.phpintllocale }}</span>
  157. <span class="label">Intl locale</span>
  158. </div>
  159. <div class="metric">
  160. <span class="value">{{ collector.phptimezone }}</span>
  161. <span class="label">Timezone</span>
  162. </div>
  163. </div>
  164. <div class="metrics">
  165. <div class="metric">
  166. <span class="value">{{ include('@WebProfiler/Icon/' ~ (collector.haszendopcache ? 'yes' : 'no') ~ '.svg') }}</span>
  167. <span class="label">OPcache</span>
  168. </div>
  169. <div class="metric">
  170. <span class="value">{{ include('@WebProfiler/Icon/' ~ (collector.hasapcu ? 'yes' : 'no-gray') ~ '.svg') }}</span>
  171. <span class="label">APCu</span>
  172. </div>
  173. <div class="metric">
  174. <span class="value">{{ include('@WebProfiler/Icon/' ~ (collector.hasxdebug ? 'yes' : 'no-gray') ~ '.svg') }}</span>
  175. <span class="label">Xdebug</span>
  176. </div>
  177. </div>
  178. <p>
  179. <a href="{{ path('_profiler_phpinfo') }}">View full PHP configuration</a>
  180. </p>
  181. {% if collector.bundles %}
  182. <h2>Enabled Bundles <small>({{ collector.bundles|length }})</small></h2>
  183. <table>
  184. <thead>
  185. <tr>
  186. <th class="key">Name</th>
  187. <th>Class</th>
  188. </tr>
  189. </thead>
  190. <tbody>
  191. {% for name in collector.bundles|keys|sort %}
  192. <tr>
  193. <th scope="row" class="font-normal">{{ name }}</th>
  194. <td class="font-normal">{{ profiler_dump(collector.bundles[name]) }}</td>
  195. </tr>
  196. {% endfor %}
  197. </tbody>
  198. </table>
  199. {% endif %}
  200. {% endblock %}