Merge branch '2.8'
* 2.8: (63 commits) [Debug] Deprecate ExceptionHandler::createResponse [Debug] cleanup ExceptionHandlerTest Reordered the toolbar elements via service priorities bumped Symfony version to 2.7.4 Increased the z-index of .sf-toolbar-info Removed an unused media query updated VERSION for 2.7.3 updated CHANGELOG for 2.7.3 Redesigned "abbr" elements Restored the old behavior for toolbars with lots of elements Tweaks and bug fixes Added some upgrade notes about the new toolbar design fixed typo in translation keys Fix the return value on error for intl methods returning arrays Removed an useless CSS class and added styles for <hr> Added a new profiler_markup_version to improve BC of the new toolbar Fix merge Removed an unused import Reverted the feature to display different toolbar versions Minor JavaScript optimizations ... Conflicts: CHANGELOG-2.7.md UPGRADE-2.8.md src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml src/Symfony/Component/Debug/composer.json src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
@ -5,17 +5,17 @@
|
||||
|
||||
{% if dumps_count %}
|
||||
{% set icon %}
|
||||
<svg width="21" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 21 28" enable-background="new 0 0 21 28" xml:space="preserve"><path fill="#3F3F3F" d="M21 14h-1c-0.3-4.8-4.1-8.7-9-9V4h-1v1c-4.8 0.3-8.7 4.1-9 9H0v1h1c0.3 4.8 4.1 8.7 9 9v1h1v-1 c4.8-0.3 8.7-4.1 9-9h1V14z M11 22v-4h-1v4c-3.7-0.2-6.7-3.2-7-7h4v-1H3c0.2-3.7 3.2-6.7 7-7v4h1V7c3.7 0.2 6.7 3.2 7 7h-4v1h4 C17.7 18.7 14.7 21.7 11 22z"/></svg>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-yellow">{{ dumps_count }}</span>
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M12,22.6c-5.8,0-10.5-4.7-10.5-10.5C1.5,6.3,6.2,1.5,12,1.5s10.5,4.7,10.5,10.5C22.5,17.9,17.8,22.6,12,22.6z M12,4.5c-4.2,0-7.5,3.4-7.5,7.5c0,4.2,3.4,7.5,7.5,7.5s7.5-3.4,7.5-7.5C19.5,7.9,16.2,4.5,12,4.5z"/>
|
||||
<path fill="#AAAAAA" d="M12,9.1c-0.8,0-1.5-0.7-1.5-1.5v-6c0-0.8,0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5v6C13.5,8.4,12.8,9.1,12,9.1zM13.5,22.4v-6c0-0.8-0.7-1.5-1.5-1.5s-1.5,0.7-1.5,1.5v6c0,0.8,0.7,1.5,1.5,1.5S13.5,23.2,13.5,22.4z M23.9,12c0-0.8-0.7-1.5-1.5-1.5h-6c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5h6C23.2,13.5,23.9,12.8,23.9,12z M9.1,12c0-0.8-0.7-1.5-1.5-1.5h-6c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5h6C8.4,13.5,9.1,12.8,9.1,12z"/>
|
||||
</svg>
|
||||
<span class="sf-toolbar-value">{{ dumps_count }}</span>
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>dump()</b>
|
||||
</div>
|
||||
{% for dump in collector.getDumps('html') %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
in
|
||||
<span>
|
||||
{% if dump.file %}
|
||||
{% set link = dump.file|file_link(dump.line) %}
|
||||
{% if link %}
|
||||
@ -26,14 +26,15 @@
|
||||
{% else %}
|
||||
{{ dump.name }}
|
||||
{% endif %}
|
||||
line {{ dump.line }}:
|
||||
</span>
|
||||
<span class="sf-toolbar-file-line">line {{ dump.line }}</span>
|
||||
{{ dump.data|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" onload="var h = this.parentNode.innerHTML, rx=/<script>(.*?)<\/script>/g, s; while (s = rx.exec(h)) {eval(s[1]);};" />
|
||||
{% endset %}
|
||||
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': true } %}
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -273,7 +273,8 @@ class Configuration implements ConfigurationInterface
|
||||
->scalarNode('cookie_path')->end()
|
||||
->scalarNode('cookie_domain')->end()
|
||||
->booleanNode('cookie_secure')->end()
|
||||
->booleanNode('cookie_httponly')->end()
|
||||
->booleanNode('cookie_httponly')->defaultTrue()->end()
|
||||
->booleanNode('use_cookies')->end()
|
||||
->scalarNode('gc_divisor')->end()
|
||||
->scalarNode('gc_probability')->defaultValue(1)->end()
|
||||
->scalarNode('gc_maxlifetime')->end()
|
||||
@ -513,6 +514,7 @@ class Configuration implements ConfigurationInterface
|
||||
->children()
|
||||
->booleanNode('enable_annotations')->defaultFalse()->end()
|
||||
->scalarNode('cache')->end()
|
||||
->scalarNode('name_converter')->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
|
@ -396,7 +396,7 @@ class FrameworkExtension extends Extension
|
||||
// session storage
|
||||
$container->setAlias('session.storage', $config['storage_id']);
|
||||
$options = array();
|
||||
foreach (array('name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'gc_maxlifetime', 'gc_probability', 'gc_divisor') as $key) {
|
||||
foreach (array('name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'use_cookies', 'gc_maxlifetime', 'gc_probability', 'gc_divisor') as $key) {
|
||||
if (isset($config[$key])) {
|
||||
$options[$key] = $config[$key];
|
||||
}
|
||||
@ -970,6 +970,10 @@ class FrameworkExtension extends Extension
|
||||
1, new Reference($config['cache'])
|
||||
);
|
||||
}
|
||||
|
||||
if ($config['name_converter']) {
|
||||
$container->getDefinition('serializer.normalizer.object')->replaceArgument(1, new Reference($config['name_converter']));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,17 +6,17 @@
|
||||
|
||||
<services>
|
||||
<service id="data_collector.config" class="Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector" public="false">
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/config.html.twig" id="config" priority="255" />
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/config.html.twig" id="config" priority="-255" />
|
||||
<call method="setKernel"><argument type="service" id="kernel" on-invalid="ignore" /></call>
|
||||
</service>
|
||||
|
||||
<service id="data_collector.request" class="Symfony\Component\HttpKernel\DataCollector\RequestDataCollector">
|
||||
<tag name="kernel.event_subscriber" />
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/request.html.twig" id="request" priority="255" />
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/request.html.twig" id="request" priority="260" />
|
||||
</service>
|
||||
|
||||
<service id="data_collector.ajax" class="Symfony\Bundle\FrameworkBundle\DataCollector\AjaxDataCollector" public="false">
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/ajax.html.twig" id="ajax" priority="255" />
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/ajax.html.twig" id="ajax" priority="256" />
|
||||
</service>
|
||||
|
||||
<service id="data_collector.exception" class="Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector" public="false">
|
||||
@ -35,13 +35,13 @@
|
||||
</service>
|
||||
|
||||
<service id="data_collector.time" class="Symfony\Component\HttpKernel\DataCollector\TimeDataCollector" public="false">
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/time.html.twig" id="time" priority="255" />
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/time.html.twig" id="time" priority="259" />
|
||||
<argument type="service" id="kernel" on-invalid="ignore" />
|
||||
<argument type="service" id="debug.stopwatch" on-invalid="ignore" />
|
||||
</service>
|
||||
|
||||
<service id="data_collector.memory" class="Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector" public="false">
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/memory.html.twig" id="memory" priority="255" />
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/memory.html.twig" id="memory" priority="258" />
|
||||
</service>
|
||||
|
||||
<service id="data_collector.router" class="Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector" >
|
||||
|
@ -107,6 +107,7 @@
|
||||
<xsd:attribute name="cookie-domain" type="xsd:string" />
|
||||
<xsd:attribute name="cookie-secure" type="xsd:boolean" />
|
||||
<xsd:attribute name="cookie-httponly" type="xsd:boolean" />
|
||||
<xsd:attribute name="use-cookies" type="xsd:boolean" />
|
||||
<xsd:attribute name="cache-limiter" type="xsd:string" />
|
||||
<xsd:attribute name="gc-maxlifetime" type="xsd:string" />
|
||||
<xsd:attribute name="gc-divisor" type="xsd:string" />
|
||||
@ -203,5 +204,6 @@
|
||||
<xsd:attribute name="enabled" type="xsd:boolean" />
|
||||
<xsd:attribute name="cache" type="xsd:string" />
|
||||
<xsd:attribute name="enable-annotations" type="xsd:boolean" />
|
||||
<xsd:attribute name="name-converter" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<!-- Normalizer -->
|
||||
<service id="serializer.normalizer.object" class="Symfony\Component\Serializer\Normalizer\ObjectNormalizer" public="false">
|
||||
<argument type="service" id="serializer.mapping.class_metadata_factory" />
|
||||
<argument>null</argument>
|
||||
<argument>null</argument> <!-- name converter -->
|
||||
<argument type="service" id="serializer.property_accessor" />
|
||||
|
||||
<!-- Run after all custom serializers -->
|
||||
@ -52,5 +52,8 @@
|
||||
<service id="serializer.encoder.json" class="Symfony\Component\Serializer\Encoder\JsonEncoder" public="false">
|
||||
<tag name="serializer.encoder" />
|
||||
</service>
|
||||
|
||||
<!-- Name converter -->
|
||||
<service id="serializer.name_converter.camel_case_to_snake_case" class="Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter" public="false" />
|
||||
</services>
|
||||
</container>
|
||||
|
@ -32,7 +32,8 @@ $container->loadFromExtension('framework', array(
|
||||
'cookie_path' => '/',
|
||||
'cookie_domain' => 'example.com',
|
||||
'cookie_secure' => true,
|
||||
'cookie_httponly' => true,
|
||||
'cookie_httponly' => false,
|
||||
'use_cookies' => true,
|
||||
'gc_maxlifetime' => 90000,
|
||||
'gc_divisor' => 108,
|
||||
'gc_probability' => 1,
|
||||
@ -64,7 +65,12 @@ $container->loadFromExtension('framework', array(
|
||||
'debug' => true,
|
||||
'file_cache_dir' => '%kernel.cache_dir%/annotations',
|
||||
),
|
||||
'serializer' => array('enabled' => true),
|
||||
'serializer' => array(
|
||||
'enabled' => true,
|
||||
'enable_annotations' => true,
|
||||
'cache' => 'serializer.mapping.cache.apc',
|
||||
'name_converter' => 'serializer.name_converter.camel_case_to_snake_case',
|
||||
),
|
||||
'ide' => 'file%%link%%format',
|
||||
'request' => array(
|
||||
'formats' => array(
|
||||
|
@ -14,7 +14,7 @@
|
||||
<framework:esi enabled="true" />
|
||||
<framework:profiler only-exceptions="true" enabled="false" />
|
||||
<framework:router resource="%kernel.root_dir%/config/routing.xml" type="xml" />
|
||||
<framework:session gc-maxlifetime="90000" gc-probability="1" gc-divisor="108" storage-id="session.storage.native" handler-id="session.handler.native_file" name="_SYMFONY" cookie-lifetime="86400" cookie-path="/" cookie-domain="example.com" cookie-secure="true" cookie-httponly="true" save-path="/path/to/sessions" />
|
||||
<framework:session gc-maxlifetime="90000" gc-probability="1" gc-divisor="108" storage-id="session.storage.native" handler-id="session.handler.native_file" name="_SYMFONY" cookie-lifetime="86400" cookie-path="/" cookie-domain="example.com" cookie-secure="true" cookie-httponly="false" use-cookies="true" save-path="/path/to/sessions" />
|
||||
<framework:request>
|
||||
<framework:format name="csv">
|
||||
<framework:mime-type>text/csv</framework:mime-type>
|
||||
@ -40,6 +40,6 @@
|
||||
</framework:translator>
|
||||
<framework:validation enabled="true" cache="apc" />
|
||||
<framework:annotations cache="file" debug="true" file-cache-dir="%kernel.cache_dir%/annotations" />
|
||||
<framework:serializer enabled="true" />
|
||||
<framework:serializer enabled="true" enable-annotations="true" cache="serializer.mapping.cache.apc" name-converter="serializer.name_converter.camel_case_to_snake_case" />
|
||||
</framework:config>
|
||||
</container>
|
||||
|
@ -24,7 +24,8 @@ framework:
|
||||
cookie_path: /
|
||||
cookie_domain: example.com
|
||||
cookie_secure: true
|
||||
cookie_httponly: true
|
||||
cookie_httponly: false
|
||||
use_cookies: true
|
||||
gc_probability: 1
|
||||
gc_divisor: 108
|
||||
gc_maxlifetime: 90000
|
||||
@ -49,7 +50,11 @@ framework:
|
||||
cache: file
|
||||
debug: true
|
||||
file_cache_dir: %kernel.cache_dir%/annotations
|
||||
serializer: { enabled: true }
|
||||
serializer:
|
||||
enabled: true
|
||||
enable_annotations: true
|
||||
cache: serializer.mapping.cache.apc
|
||||
name_converter: serializer.name_converter.camel_case_to_snake_case
|
||||
ide: file%%link%%format
|
||||
request:
|
||||
formats:
|
||||
|
@ -149,7 +149,8 @@ abstract class FrameworkExtensionTest extends TestCase
|
||||
$this->assertEquals('/', $options['cookie_path']);
|
||||
$this->assertEquals('example.com', $options['cookie_domain']);
|
||||
$this->assertTrue($options['cookie_secure']);
|
||||
$this->assertTrue($options['cookie_httponly']);
|
||||
$this->assertFalse($options['cookie_httponly']);
|
||||
$this->assertTrue($options['use_cookies']);
|
||||
$this->assertEquals(108, $options['gc_divisor']);
|
||||
$this->assertEquals(1, $options['gc_probability']);
|
||||
$this->assertEquals(90000, $options['gc_maxlifetime']);
|
||||
@ -459,6 +460,13 @@ abstract class FrameworkExtensionTest extends TestCase
|
||||
{
|
||||
$container = $this->createContainerFromFile('full');
|
||||
$this->assertTrue($container->has('serializer'));
|
||||
|
||||
$argument = $container->getDefinition('serializer.mapping.chain_loader')->getArgument(0);
|
||||
|
||||
$this->assertCount(1, $argument);
|
||||
$this->assertEquals('Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader', $argument[0]->getClass());
|
||||
$this->assertEquals(new Reference('serializer.mapping.cache.apc'), $container->getDefinition('serializer.mapping.class_metadata_factory')->getArgument(1));
|
||||
$this->assertEquals(new Reference('serializer.name_converter.camel_case_to_snake_case'), $container->getDefinition('serializer.normalizer.object')->getArgument(1));
|
||||
}
|
||||
|
||||
public function testAssetHelperWhenAssetsAreEnabled()
|
||||
|
@ -366,7 +366,7 @@ class SecurityExtension extends Extension
|
||||
$listeners[] = new Reference('security.access_listener');
|
||||
|
||||
// Exception listener
|
||||
$exceptionListener = new Reference($this->createExceptionListener($container, $firewall, $id, $configuredEntryPoint ?: $defaultEntryPoint));
|
||||
$exceptionListener = new Reference($this->createExceptionListener($container, $firewall, $id, $configuredEntryPoint ?: $defaultEntryPoint, $firewall['stateless']));
|
||||
|
||||
return array($matcher, $listeners, $exceptionListener);
|
||||
}
|
||||
@ -551,12 +551,13 @@ class SecurityExtension extends Extension
|
||||
return 'security.user.provider.concrete.'.$name;
|
||||
}
|
||||
|
||||
private function createExceptionListener($container, $config, $id, $defaultEntryPoint)
|
||||
private function createExceptionListener($container, $config, $id, $defaultEntryPoint, $stateless)
|
||||
{
|
||||
$exceptionListenerId = 'security.exception_listener.'.$id;
|
||||
$listener = $container->setDefinition($exceptionListenerId, new DefinitionDecorator('security.exception_listener'));
|
||||
$listener->replaceArgument(3, $id);
|
||||
$listener->replaceArgument(4, null === $defaultEntryPoint ? null : new Reference($defaultEntryPoint));
|
||||
$listener->replaceArgument(8, $stateless);
|
||||
|
||||
// access denied handler setup
|
||||
if (isset($config['access_denied_handler'])) {
|
||||
|
@ -199,6 +199,7 @@
|
||||
<argument>%security.access.denied_url%</argument>
|
||||
<argument type="service" id="security.access.denied_handler" on-invalid="null" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
<argument>false</argument> <!-- Stateless -->
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.switchuser_listener" class="Symfony\Component\Security\Http\Firewall\SwitchUserListener" public="false" abstract="true">
|
||||
|
@ -2,39 +2,47 @@
|
||||
|
||||
{% block toolbar %}
|
||||
{% if collector.tokenClass %}
|
||||
{% set color_code = (collector.enabled and collector.authenticated) ? 'green' : 'yellow' %}
|
||||
{% set authentication_color_code = (collector.enabled and collector.authenticated) ? 'green' : 'red' %}
|
||||
{% set authentication_color_text = (collector.enabled and collector.authenticated) ? 'Yes' : 'No' %}
|
||||
{% set is_authenticated = collector.enabled and collector.authenticated %}
|
||||
{% set color_code = is_authenticated ? '' : 'yellow' %}
|
||||
{% else %}
|
||||
{% set color_code = collector.enabled ? 'red' : 'black' %}
|
||||
{% set color_code = collector.enabled ? 'red' : '' %}
|
||||
{% endif %}
|
||||
|
||||
{% set icon %}
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M21,20.4V22H3v-1.6c0-3.7,2.4-6.9,5.8-8c-1.7-1.1-2.9-3-2.9-5.2c0-3.4,2.7-6.1,6.1-6.1s6.1,2.7,6.1,6.1c0,2.2-1.2,4.1-2.9,5.2C18.6,13.5,21,16.7,21,20.4z"/>
|
||||
</svg>
|
||||
<span class="sf-toolbar-value">{{ collector.user|default('n/a') }}</span>
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
{% if collector.tokenClass %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Logged in as</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ color_code }}">{{ collector.user }}</span>
|
||||
<span>{{ collector.user }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Authenticated</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ authentication_color_code }}">{{ authentication_color_text }}</span>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ is_authenticated ? 'green' : 'red' }}">{{ is_authenticated ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
{% if collector.tokenClass != null %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Token class</b>
|
||||
{{ collector.tokenClass|abbr_class }}
|
||||
<span>{{ collector.tokenClass|abbr_class }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% elseif collector.enabled %}
|
||||
You are not authenticated.
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<span>You are not authenticated.</span>
|
||||
</div>
|
||||
{% else %}
|
||||
The security is disabled.
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<span>The security is disabled.</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{% set icon %}
|
||||
<svg width="24" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 24 28" enable-background="new 0 0 24 28" xml:space="preserve"><g><path fill="#3F3F3F" d="M8.6 14.6c0-0.4 0-0.6 0-0.9c0.2-0.1 0.5-0.6 0.5-1.1c0.1 0 0.3-0.1 0.4-0.6c0-0.3-0.1-0.4-0.2-0.5 c0.2-0.6 0.6-2.6-0.8-2.8C8.4 8.4 8 8.3 7.5 8.3c-2 0-2.2 1.5-1.8 3.2c-0.1 0-0.2 0.2-0.2 0.5c0.1 0.5 0.3 0.6 0.4 0.6 c0 0.5 0.4 1 0.5 1.1c0 0.3 0 0.6 0 0.9c-0.4 1.1-3 0.8-3.2 2.8h8.5C11.7 15.3 9 15.6 8.6 14.6z"/><path fill="#3F3F3F" d="M18 10.7c-0.2 0-0.4 0-0.5 0.1c-0.2 0.1-0.3 0.2-0.5 0.5c-0.2 0.2-0.3 0.5-0.4 0.8s-0.1 0.6-0.1 0.8 c0 0.4 0.1 0.7 0.3 0.9c0.2 0.2 0.4 0.3 0.6 0.3c0.2 0 0.3 0 0.5-0.1c0.2-0.1 0.3-0.2 0.5-0.4c0.2-0.2 0.3-0.4 0.4-0.7 c0.1-0.3 0.2-0.6 0.2-0.9c0-0.4-0.1-0.7-0.3-0.9C18.5 10.8 18.2 10.7 18 10.7z"/><path fill="#3F3F3F" d="M22.2 6H1.8C1.3 6 1 6.3 1 6.8v14.4c0 0.4 0.3 0.8 0.8 0.8h3.8v-0.8c-0.4 0-0.8-0.3-0.8-0.8 c0-0.4 0.3-0.8 0.8-0.8h1.5c0.4 0 0.8 0.3 0.8 0.8c0 0.4-0.3 0.8-0.8 0.8v0.8h9.9v-0.8c-0.4 0-0.8-0.3-0.8-0.8 c0-0.4 0.3-0.8 0.8-0.8h1.5c0.4 0 0.8 0.3 0.8 0.8c0 0.4-0.3 0.8-0.8 0.8v0.8h3.8c0.4 0 0.8-0.3 0.8-0.8V6.8C23 6.3 22.7 6 22.2 6z M12.4 17.4c0 0.4-0.3 0.8-0.8 0.8H3.3c-0.4 0-0.8-0.3-0.8-0.8V8.3c0-0.4 0.3-0.8 0.8-0.8h8.3c0.4 0 0.8 0.3 0.8 0.8V17.4z M21.4 15.6c-0.4 0.3-0.8 0.6-1.3 0.7c-0.5 0.2-1.1 0.3-1.8 0.3c-0.6 0-1.2-0.1-1.8-0.2c-0.5-0.2-1-0.4-1.4-0.7 c-0.4-0.3-0.7-0.7-0.9-1.1c-0.2-0.5-0.4-1.1-0.4-1.8c0-0.7 0.1-1.4 0.4-2c0.4-0.8 0.9-1.4 1.5-1.8c0.6-0.4 1.4-0.6 2.4-0.6 c0.7 0 1.4 0.1 1.9 0.4c0.6 0.3 1 0.7 1.3 1.3c0.3 0.5 0.4 1 0.4 1.6c0 0.8-0.3 1.6-0.9 2.2c-0.5 0.6-1.1 0.9-1.7 0.9 c-0.2 0-0.4 0-0.5-0.1c-0.1-0.1-0.2-0.1-0.3-0.3c0-0.1-0.1-0.2-0.1-0.4c-0.2 0.2-0.4 0.4-0.6 0.5c-0.2 0.1-0.5 0.2-0.7 0.2 c-0.3 0-0.5-0.1-0.7-0.2c-0.2-0.1-0.4-0.4-0.6-0.7c-0.2-0.3-0.2-0.7-0.2-1c0-0.5 0.1-0.9 0.4-1.4c0.2-0.5 0.5-0.8 0.9-1 c0.3-0.2 0.7-0.3 1-0.3c0.3 0 0.5 0.1 0.7 0.2c0.2 0.1 0.4 0.3 0.6 0.6l0.1-0.7h0.8l-0.6 2.9c-0.1 0.4-0.1 0.6-0.1 0.7 c0 0.1 0 0.1 0.1 0.2c0.1 0.1 0.1 0.1 0.2 0.1c0.2 0 0.4-0.1 0.6-0.3c0.3-0.2 0.6-0.5 0.8-0.9c0.2-0.4 0.3-0.8 0.3-1.2 c0-0.5-0.1-0.9-0.4-1.3c-0.2-0.4-0.6-0.8-1.1-1s-1-0.4-1.6-0.4c-0.7 0-1.3 0.2-1.8 0.5c-0.6 0.3-1 0.8-1.3 1.4 c-0.3 0.6-0.5 1.2-0.5 1.9c0 0.7 0.2 1.3 0.5 1.8c0.3 0.5 0.8 0.9 1.3 1.1c0.6 0.2 1.2 0.4 1.9 0.4c0.8 0 1.4-0.1 1.9-0.4 c0.5-0.3 0.9-0.6 1.1-0.9h0.8C22 14.9 21.8 15.3 21.4 15.6z"/></g></svg>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ color_code }}">{{ collector.user }}</span>
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: color_code }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block menu %}
|
||||
|
@ -56,7 +56,7 @@
|
||||
<service id="twig.profile" class="Twig_Profiler_Profile" />
|
||||
|
||||
<service id="data_collector.twig" class="Symfony\Bridge\Twig\DataCollector\TwigDataCollector" public="false">
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/twig.html.twig" id="twig" priority="255" />
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/twig.html.twig" id="twig" priority="257" />
|
||||
<argument type="service" id="twig.profile" />
|
||||
</service>
|
||||
|
||||
|
@ -11,13 +11,13 @@
|
||||
|
||||
namespace Symfony\Bundle\WebProfilerBundle\Controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\HttpKernel\Profiler\Profiler;
|
||||
use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
|
||||
/**
|
||||
@ -207,6 +207,7 @@ class ProfilerController
|
||||
'templates' => $this->getTemplateManager()->getTemplates($profile),
|
||||
'profiler_url' => $url,
|
||||
'token' => $token,
|
||||
'profiler_markup_version' => 2, // 1 = original toolbar, 2 = Symfony 2.8+ toolbar
|
||||
)), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ class TemplateManager
|
||||
public function getTemplates(Profile $profile)
|
||||
{
|
||||
$templates = $this->getNames($profile);
|
||||
|
||||
foreach ($templates as $name => $template) {
|
||||
$templates[$name] = $this->twig->loadTemplate($template);
|
||||
}
|
||||
|
@ -2,15 +2,13 @@
|
||||
|
||||
{% block toolbar %}
|
||||
{% set icon %}
|
||||
<span>
|
||||
<svg width="24" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 24 28" enable-background="new 0 0 24 28" xml:space="preserve"><polygon fill="#3F3F3F" points="18.4,3.8 12.8,9.4 16.3,9.4 16.3,21.1 14.1,21.1 9.9,25.3 16.3,25.3 20.5,25.3 20.5,21.1 20.5,9.4 23.9,9.4"/><polygon fill="#3F3F3F" points="5.6,25.3 11.2,19.7 7.7,19.7 7.7,8 9.9,8 14.1,3.8 7.7,3.8 3.5,3.8 3.5,8 3.5,19.7 0.1,19.7"/></svg>
|
||||
<span class="sf-toolbar-ajax-requests">0</span>
|
||||
</span>
|
||||
{{ include('@WebProfiler/Icon/ajax.svg') }}
|
||||
<span class="sf-toolbar-value sf-toolbar-ajax-requests">0</span>
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>AJAX requests</b>
|
||||
<span class="sf-toolbar-ajax-info"></span>
|
||||
<b class="sf-toolbar-ajax-info"></b>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<table class="sf-toolbar-ajax-requests">
|
||||
@ -26,5 +24,6 @@
|
||||
</table>
|
||||
</div>
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false }) }}
|
||||
{% endblock %}
|
||||
|
@ -1,104 +1,44 @@
|
||||
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
||||
|
||||
{% block toolbar %}
|
||||
{# Symfony Logo #}
|
||||
{% set icon %}
|
||||
<a href="https://symfony.com/">
|
||||
<svg width="26" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 26 28" enable-background="new 0 0 26 28" xml:space="preserve"><path fill="#010202" d="M13 0C5.8 0 0 5.8 0 13c0 7.2 5.8 13 13 13c7.2 0 13-5.8 13-13C26 5.8 20.2 0 13 0z M20 7.5 c-0.6 0-1-0.3-1-0.9c0-0.2 0-0.4 0.2-0.6c0.1-0.3 0.2-0.3 0.2-0.4c0-0.3-0.5-0.4-0.7-0.4c-2 0.1-2.5 2.7-2.9 4.8l-0.2 1.1 c1.1 0.2 1.9 0 2.4-0.3c0.6-0.4-0.2-0.8-0.1-1.3C18 9.2 18.4 9 18.7 8.9c0.5 0 0.8 0.5 0.8 1c0 0.8-1.1 2-3.3 1.9 c-0.3 0-0.5 0-0.7-0.1L15 14.1c-0.4 1.7-0.9 4.1-2.6 6.2c-1.5 1.8-3.1 2.1-3.8 2.1c-1.3 0-2.1-0.6-2.2-1.6c0-0.9 0.8-1.4 1.3-1.4 c0.7 0 1.2 0.5 1.2 1.1c0 0.5-0.2 0.6-0.4 0.7c-0.1 0.1-0.3 0.2-0.3 0.4c0 0.1 0.1 0.3 0.4 0.3c0.5 0 0.9-0.3 1.2-0.5 c1.3-1 1.7-2.9 2.4-6.2l0.1-0.8c0.2-1.1 0.5-2.3 0.8-3.5c-0.9-0.7-1.4-1.5-2.6-1.8c-0.8-0.2-1.3 0-1.7 0.4C8.4 10 8.6 10.7 9 11.1 l0.7 0.7c0.8 0.9 1.3 1.7 1.1 2.7c-0.3 1.6-2.1 2.8-4.3 2.1c-1.9-0.6-2.2-1.9-2-2.7c0.2-0.6 0.7-0.8 1.2-0.6 c0.5 0.2 0.7 0.8 0.6 1.3c0 0.1 0 0.1-0.1 0.3C6 15 5.9 15.2 5.9 15.3c-0.1 0.4 0.4 0.7 0.8 0.8c0.8 0.3 1.7-0.2 1.9-0.9 c0.2-0.6-0.2-1.1-0.4-1.2l-0.8-0.9c-0.4-0.4-1.2-1.5-0.8-2.8c0.2-0.5 0.5-1 0.9-1.4c1-0.7 2-0.8 3-0.6c1.3 0.4 1.9 1.2 2.8 1.9 c0.5-1.3 1.1-2.6 2-3.8c0.9-1 2-1.7 3.3-1.8C20 4.8 21 5.4 21 6.3C21 6.7 20.8 7.5 20 7.5z"/></svg>
|
||||
<span>
|
||||
{% if collector.applicationname %}
|
||||
{{ collector.applicationname }} {{ collector.applicationversion }}
|
||||
{% elseif collector.symfonyState is defined %}
|
||||
{% if 'unknown' == collector.symfonyState -%}
|
||||
<span class="sf-toolbar-status sf-toolbar-info-piece-additional" title="Unable to retrieve information about the Symfony version.">
|
||||
{%- elseif 'eol' == collector.symfonyState -%}
|
||||
<span class="sf-toolbar-status sf-toolbar-status-red" title="This Symfony version will no longer receive security fixes.">
|
||||
{%- elseif 'eom' == collector.symfonyState -%}
|
||||
<span class="sf-toolbar-status sf-toolbar-status-yellow" title="This Symfony version will only receive security fixes.">
|
||||
{%- elseif 'dev' == collector.symfonyState -%}
|
||||
<span class="sf-toolbar-status sf-toolbar-status-yellow" title="This Symfony version is still in the development phase.">
|
||||
{%- else -%}
|
||||
<span class="sf-toolbar-status sf-toolbar-status-green">
|
||||
{%- endif -%}
|
||||
{{ collector.symfonyversion }}</span>
|
||||
{% if 'unknown' == collector.symfonyState %}
|
||||
{% set block_status = '' %}
|
||||
{% set symfony_version_status = 'Unable to retrieve information about the Symfony version.' %}
|
||||
{% elseif 'eol' == collector.symfonyState %}
|
||||
{% set block_status = 'red' %}
|
||||
{% set symfony_version_status = 'This Symfony version will no longer receive security fixes.' %}
|
||||
{% elseif 'eom' == collector.symfonyState %}
|
||||
{% set block_status = 'yellow' %}
|
||||
{% set symfony_version_status = 'This Symfony version will only receive security fixes.' %}
|
||||
{% elseif 'dev' == collector.symfonyState %}
|
||||
{% set block_status = 'yellow' %}
|
||||
{% set symfony_version_status = 'This Symfony version is still in the development phase.' %}
|
||||
{% else %}
|
||||
{% set block_status = '' %}
|
||||
{% set symfony_version_status = '' %}
|
||||
{% endif %}
|
||||
|
||||
{% set icon %}
|
||||
{% if collector.symfonyState is defined %}
|
||||
<span class="sf-toolbar-label">
|
||||
{{ include('@WebProfiler/Icon/symfony.svg') }}
|
||||
</span>
|
||||
</a>
|
||||
<span class="sf-toolbar-value">{{ collector.symfonyversion }}</span>
|
||||
{% elseif collector.applicationname %}
|
||||
<span class="sf-toolbar-label">{{ collector.applicationname }}</span>
|
||||
<span class="sf-toolbar-value">{{ collector.applicationversion }}</span>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
{% if collector.applicationname %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
{{ collector.applicationname }} <b>{{ collector.applicationversion }}</b>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
Symfony <b>{{ collector.symfonyversion }}</b>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">Symfony Documentation</a>
|
||||
</div>
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}
|
||||
|
||||
{# PHP Information #}
|
||||
{% set icon %}
|
||||
<a href="{{ path('_profiler_phpinfo') }}">
|
||||
<svg width="26" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 26 28" enable-background="new 0 0 26 28" xml:space="preserve"><g><path fill="#010202" d="M8 11.5c-0.2-0.1-0.4-0.1-0.7-0.1s-0.5 0-0.8 0c0 0-0.1 0-0.1 0c0 0-0.1 0-0.1 0c0 0-0.1 0-0.1 0 c0 0-0.1 0-0.1 0v0l-0.9 3.3c0 0 0 0 0 0c0 0 0 0 0 0c0 0 0 0 0 0c0 0 0 0 0 0c0 0 0 0 0.1 0c0 0 0.1 0 0.1 0c0.3 0 0.7 0 1 0 c0.3 0 0.6-0.1 0.8-0.2c0.2-0.1 0.4-0.3 0.6-0.5c0.2-0.3 0.3-0.6 0.4-1.1c0.1-0.4 0.1-0.7 0.1-0.9C8.3 11.7 8.1 11.6 8 11.5z"/><path fill="#010202" d="M21.3 11.5c-0.2-0.1-0.4-0.1-0.7-0.1s-0.5 0-0.8 0c0 0-0.1 0-0.1 0c0 0-0.1 0-0.1 0c0 0-0.1 0-0.1 0 s-0.1 0-0.1 0v0l-0.9 3.3c0 0 0 0 0 0c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c0 0 0 0 0.1 0c0 0 0.1 0 0.1 0c0.3 0 0.7 0 1 0 c0.3 0 0.6-0.1 0.8-0.2c0.2-0.1 0.4-0.3 0.6-0.5c0.2-0.3 0.3-0.6 0.4-1.1c0.1-0.4 0.1-0.7 0.1-0.9C21.6 11.7 21.5 11.6 21.3 11.5z"/><path fill="#010202" d="M13 0C5.8 0 0 5.8 0 13c0 7.2 5.8 13 13 13c7.2 0 13-5.8 13-13C26 5.8 20.2 0 13 0z M9.8 12.9 c0 0.2-0.1 0.4-0.2 0.6c-0.1 0.2-0.2 0.4-0.2 0.6c-0.1 0.2-0.2 0.4-0.3 0.5S8.8 14.9 8.7 15c-0.2 0.2-0.4 0.3-0.6 0.5 c-0.2 0.1-0.4 0.2-0.6 0.3c-0.2 0.1-0.4 0.1-0.6 0.1c-0.2 0-0.4 0-0.7 0H4.8L4.2 18H2.7l2.1-7.9h2.9c0.4 0 0.8 0.1 1.1 0.2 c0.3 0.1 0.5 0.3 0.7 0.6c0.2 0.2 0.3 0.5 0.3 0.9C10 12.1 9.9 12.4 9.8 12.9z M13.7 15.9l0.9-3.5c0.1-0.2 0.1-0.3 0.1-0.5 c0-0.1 0-0.2-0.1-0.3c-0.1-0.1-0.2-0.1-0.3-0.2c-0.1 0-0.3-0.1-0.5-0.1l-1.2 0l-1.2 4.5H10L12.1 8h1.5l-0.6 2.1h1.4 c0.4 0 0.7 0 1 0.1s0.5 0.2 0.7 0.3c0.2 0.1 0.3 0.4 0.3 0.6c0 0.3 0 0.6-0.1 1l-1 3.7H13.7z M23 13.4c-0.1 0.2-0.2 0.4-0.2 0.6 c-0.1 0.2-0.2 0.4-0.3 0.5S22.2 14.9 22 15c-0.2 0.2-0.4 0.3-0.6 0.5c-0.2 0.1-0.4 0.2-0.6 0.3c-0.2 0.1-0.4 0.1-0.6 0.1 c-0.2 0-0.4 0-0.7 0h-1.3L17.6 18h-1.5l2.1-7.9h2.9c0.4 0 0.8 0.1 1.1 0.2c0.3 0.1 0.5 0.3 0.7 0.6c0.2 0.2 0.3 0.5 0.3 0.9 c0 0.3 0 0.7-0.1 1.1C23.1 13.1 23.1 13.3 23 13.4z"/></g></svg>
|
||||
</a>
|
||||
{% endset %}
|
||||
{% set text %}
|
||||
{% spaceless %}
|
||||
<div class="sf-toolbar-info-piece sf-toolbar-info-php">
|
||||
<b>PHP</b>
|
||||
<span>{{ collector.phpversion }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece sf-toolbar-info-php-ext">
|
||||
<b>PHP Extensions</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasxdebug ? 'green' : 'red' }}">xdebug</span>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasaccelerator ? 'green' : 'red' }}">accel</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>PHP SAPI</b>
|
||||
<span>{{ collector.sapiName }}</span>
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}
|
||||
|
||||
{# Environment #}
|
||||
{% set debug_status_class %}sf-toolbar-status sf-toolbar-status-{{ collector.debug ? 'green' : 'red' }}{% endset %}
|
||||
{% set icon %}
|
||||
<svg width="21" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 21 28" enable-background="new 0 0 21 28" xml:space="preserve"><g><path fill="#3F3F3F" d="M5 17H1c-0.5 0-1-0.4-1-1V9c0-0.5 0.4-1 1-1h4c0.5 0 1 0.4 1 1v7C6 16.6 5.6 17 5 17z"/><path fill="#3F3F3F" d="M19 17h-4c-0.5 0-1-0.4-1-1V9c0-0.5 0.4-1 1-1h4c0.5 0 1 0.4 1 1v7C20 16.6 19.6 17 19 17z"/><path fill="#3F3F3F" d="M12.1 20h-4c-0.5 0-1-0.4-1-1v-7c0-0.5 0.4-1 1-1h4c0.5 0 1 0.4 1 1v7C13.1 19.5 12.6 20 12.1 20z"/><rect x="9.1" y="5.8" fill="#3F3F3F" width="2" height="4.5"/><rect x="16" y="17.7" fill="#3F3F3F" width="2" height="4.5"/><rect x="2.1" y="17.7" fill="#3F3F3F" width="2" height="4.5"/><rect x="9.1" y="20.7" fill="#3F3F3F" width="2" height="1.5"/><rect x="2.1" y="5.7" fill="#3F3F3F" width="2" height="1.5"/><rect x="16.1" y="5.7" fill="#3F3F3F" width="2" height="1.5"/></g></svg>
|
||||
<span class="sf-toolbar-info-piece-additional {{ debug_status_class }}">{{ token }}</span>
|
||||
{% if 'n/a' != collector.appname or 'n/a' != collector.env %}
|
||||
<span class="sf-toolbar-info-piece-additional-detail">
|
||||
<span class="sf-toolbar-info-with-delimiter">{{ collector.appname }}</span>
|
||||
<span>{{ collector.env }}</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{% set text %}
|
||||
{% spaceless %}
|
||||
{% if 'n/a' != collector.appname %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Name</b>
|
||||
<span>{{ collector.appname }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if 'n/a' != collector.env %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Environment</b>
|
||||
<span>{{ collector.env }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if 'n/a' != collector.debug %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Debug</b>
|
||||
<span class="{{ debug_status_class }}">{{ collector.debug ? 'en' : 'dis' }}abled</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Token</b>
|
||||
<b>Profiler token</b>
|
||||
<span>
|
||||
{% if profiler_url %}
|
||||
<a href="{{ profiler_url }}">{{ collector.token }}</a>
|
||||
@ -107,9 +47,60 @@
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
|
||||
{% if 'n/a' != collector.appname %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Kernel name</b>
|
||||
<span>{{ collector.appname }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if 'n/a' != collector.env %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Environment</b>
|
||||
<span>{{ collector.env }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if 'n/a' != collector.debug %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Debug</b>
|
||||
<span class="{{ debug_status_class }}">{{ collector.debug ? 'enabled' : 'disabled' }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="sf-toolbar-info-piece sf-toolbar-info-php">
|
||||
<b>PHP version</b>
|
||||
<span>
|
||||
{{ collector.phpversion }}
|
||||
<a href="{{ path('_profiler_phpinfo') }}">View phpinfo()</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="sf-toolbar-info-piece sf-toolbar-info-php-ext">
|
||||
<b>PHP Extensions</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasxdebug ? 'green' : 'red' }}">xdebug</span>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasaccelerator ? 'green' : 'red' }}">accel</span>
|
||||
</div>
|
||||
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>PHP SAPI</b>
|
||||
<span>{{ collector.sapiName }}</span>
|
||||
</div>
|
||||
|
||||
{% if collector.symfonyversion is defined %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Resources</b>
|
||||
<span>
|
||||
<a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">
|
||||
Read Symfony {{ collector.symfonyversion }} Docs
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: block_status }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block menu %}
|
||||
|
@ -3,13 +3,31 @@
|
||||
{% from _self import form_tree_entry, form_tree_details %}
|
||||
|
||||
{% block toolbar %}
|
||||
{% if collector.data|length %}
|
||||
{% if collector.data.nb_errors > 0 or collector.data.forms|length %}
|
||||
{% set status_color = collector.data.nb_errors ? 'red' : '' %}
|
||||
{% set icon %}
|
||||
<svg width="20" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 20 28" enable-background="new 0 0 20 28" xml:space="preserve"><g><polygon fill="#3F3F3F" points="16,5 13,5 13,3 7,3 7,5 4,5 4,9 16,9"/><path fill="#3F3F3F" d="M17 6v4H3V6H0v19h20V6H17z M8 22H3v-1h5V22z M17 20H3v-1h14V20z M17 18H3v-1h14V18z M17 16H3v-1h14V16z M17 14H4v-1h13V14z"/></g></svg>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{% if collector.data.nb_errors %}red{% else %}green{% endif %}">{% if collector.data.nb_errors %}{{ collector.data.nb_errors }}{% else %}{{ collector.data.forms|length }}{% endif %}</span>
|
||||
{{ include('@WebProfiler/Icon/form.svg') }}
|
||||
<span class="sf-toolbar-value">
|
||||
{% if collector.data.nb_errors %}
|
||||
{{ collector.data.nb_errors }}
|
||||
{% else %}
|
||||
{{ collector.data.forms|length }}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endset %}
|
||||
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
|
||||
{% set text %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Number of forms</b>
|
||||
<span class="sf-toolbar-status">{{ collector.data.forms|length }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Number of errors</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.data.nb_errors > 0 ? 'red' }}">{{ collector.data.nb_errors }}</span>
|
||||
</div>
|
||||
{% endset %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -5,36 +5,30 @@
|
||||
{% block toolbar %}
|
||||
{% if collector.counterrors or collector.countdeprecations or collector.countscreams %}
|
||||
{% set icon %}
|
||||
<svg width="16" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 16 28" enable-background="new 0 0 16 28" xml:space="preserve"><g><path fill="#3F3F3F" d="M15 6h-1V5c0-0.5-0.5-1-1-1H2C1.4 4 1 4.4 1 5v2v13c0 1.6 1.3 3 3 3h11c0.5 0 1-0.5 1-1V7 C16 6.5 15.5 6 15 6z M6 15h3v3H6V15z M6 13V7h3v6H6z M15 21c0 0.6-0.4 1-1 1H5c-0.9 0-1.7-0.4-2.2-1H13c0.6 0 1-0.4 1-1V7 c0.5 0 1 0.5 1 1V21z"/></g></svg>
|
||||
{% if collector.counterrors %}
|
||||
{% set status_color = "red" %}
|
||||
{% elseif collector.countdeprecations %}
|
||||
{% set status_color = "yellow" %}
|
||||
{% endif %}
|
||||
{% set status_color = collector.counterrors ? 'red' : collector.countdeprecations ? 'yellow' : '' %}
|
||||
{% set error_count = collector.counterrors + collector.countdeprecations + collector.countscreams %}
|
||||
<span class="sf-toolbar-status{% if status_color is defined %} sf-toolbar-status-{{ status_color }}{% endif %}">{{ error_count }}</span>
|
||||
{{ include('@WebProfiler/Icon/logger.svg') }}
|
||||
<span class="sf-toolbar-value">{{ error_count }}</span>
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
{% if collector.counterrors %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Errors</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-red">{{ collector.counterrors }}</span>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.counterrors ? 'red' }}">{{ collector.counterrors|default(0) }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if collector.countdeprecations %}
|
||||
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Deprecated Calls</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-yellow">{{ collector.countdeprecations }}</span>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.countdeprecations ? 'yellow' }}">{{ collector.countdeprecations|default(0) }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if collector.countscreams %}
|
||||
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Silenced Errors</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status">{{ collector.countscreams }}</span>
|
||||
<span class="sf-toolbar-status">{{ collector.countscreams|default(0) }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -2,16 +2,23 @@
|
||||
|
||||
{% block toolbar %}
|
||||
{% set icon %}
|
||||
<span>
|
||||
<svg width="13" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 13 28" enable-background="new 0 0 13 28" xml:space="preserve"><g><rect x="3" y="11" fill="#BCBCBB" width="7" height="9"/></g><g><path fill="#3F3F3F" d="M11 6V21H2V6H0V22c0 0.6 0.4 1 1 1h11c0.6 0 1-0.4 1-1V6H11z"/></g></svg>
|
||||
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB</span>
|
||||
</span>
|
||||
{% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' : '' %}
|
||||
{{ include('@WebProfiler/Icon/memory.svg') }}
|
||||
<span class="sf-toolbar-value">{{ '%.1f'|format(collector.memory / 1024 / 1024) }}</span>
|
||||
<span class="sf-toolbar-label">MB</span>
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Memory usage</b>
|
||||
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} / {{ collector.memoryLimit == -1 ? '∞' : '%.1f'|format(collector.memoryLimit / 1024 / 1024)|escape }} MB</span>
|
||||
<b>Peak memory usage</b>
|
||||
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB</span>
|
||||
</div>
|
||||
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>PHP memory limit</b>
|
||||
<span>{{ collector.memoryLimit == -1 ? '∞' : '%.0f'|format(collector.memoryLimit / 1024 / 1024)|escape }} MB</span>
|
||||
</div>
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: status_color }) }}
|
||||
{% endblock %}
|
||||
|
@ -1,41 +1,54 @@
|
||||
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
||||
|
||||
{% block toolbar %}
|
||||
|
||||
|
||||
{% set request_handler %}
|
||||
{% if collector.controller.class is defined %}
|
||||
{% set link = collector.controller.file|file_link(collector.controller.line) %}
|
||||
{% if collector.controller.method %}
|
||||
<span class="sf-toolbar-info-class sf-toolbar-info-with-next-pointer">{{ collector.controller.class|abbr_class }}</span>
|
||||
<span class="sf-toolbar-info-method"{% if link %} onclick="window.location='{{link|e('js')}}';window.event.stopPropagation();return false;"{% endif %}>
|
||||
{{ collector.controller.method }}
|
||||
</span>
|
||||
{% if link %}<a href="{{ link }}" title="{{ collector.controller.file }}">{% else %}<span>{% endif %}
|
||||
|
||||
{{ collector.controller.class|abbr_class|striptags }}
|
||||
|
||||
{%- if collector.controller.method -%}
|
||||
:: {{ collector.controller.method }}
|
||||
{%- endif -%}
|
||||
|
||||
{% if link %}</a>{% else %}</span>{% endif %}
|
||||
{% else %}
|
||||
<span class="sf-toolbar-info-class"{% if link %} onclick="window.location='{{link|e('js')}}';window.event.stopPropagation();return false;"{% endif %}>{{ collector.controller.class|abbr_class }}</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="sf-toolbar-info-class">{{ collector.controller }}</span>
|
||||
<span>{{ collector.controller }}</span>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{% set request_status_code_color = (400 > collector.statuscode) ? ((200 == collector.statuscode) ? 'green' : 'yellow') : 'red'%}
|
||||
{% set request_route = collector.route ? collector.route : 'NONE' %}
|
||||
|
||||
{% set request_status_code_color = (400 > collector.statuscode) ? ((200 == collector.statuscode) ? 'green' : 'yellow') : 'red' %}
|
||||
|
||||
{% set icon %}
|
||||
<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 28 28" enable-background="new 0 0 28 28" xml:space="preserve"><path fill="#3F3F3F" d="M19.5 18c0 0.2 0 0.5 0.1 0.8c-0.8 0.7-1.2 1.2-1.3 1.3c0 0 0 0.1 0 0.1c0.7 1 1.1 1.4 1.1 1.4 c0.1 0 0.3-0.1 0.8-0.3c0.4-0.2 0.8-0.4 0.9-0.5c0.1 0.1 0.3 0.1 0.3 0.2c0.1 0 0.2 0.1 0.4 0.1c0 0.2 0.1 0.6 0.3 1 c0.1 0.5 0.2 0.7 0.3 0.8c0 0 0.6-0.1 1.8-0.2c0 0 0.1 0 0.1-0.1c0.1-0.2 0.1-0.8 0.1-1.9c0.2-0.1 0.4-0.3 0.6-0.5 c1.2 0.4 1.8 0.5 1.9 0.4l0.7-1.6l0 0c0.1-0.1-0.5-0.5-1.6-1.1c0-0.3 0-0.5-0.1-0.8c0.8-0.7 1.2-1.2 1.3-1.3c0 0 0-0.1 0-0.1 c-0.7-0.9-1.1-1.4-1.1-1.4l-0.1 0c-0.5 0.2-1 0.5-1.6 0.8c-0.1-0.1-0.3-0.1-0.3-0.2c-0.1 0-0.2-0.1-0.4-0.1c0-0.2-0.1-0.6-0.3-1 c-0.1-0.5-0.2-0.7-0.3-0.8c0 0-0.2 0-0.4 0c-0.3 0-0.6 0.1-0.9 0.1c-0.3 0-0.5 0.1-0.5 0.1c0 0-0.1 0-0.1 0.1 c-0.1 0.2-0.1 0.8-0.1 1.9c-0.2 0.1-0.4 0.3-0.6 0.5c-1.2-0.4-1.8-0.5-1.9-0.4l-0.7 1.6C17.9 17 18.4 17.4 19.5 18z M22.2 16.5 c0.4-0.2 0.8-0.2 1.2 0c0.4 0.2 0.7 0.5 0.9 0.9c0.2 0.4 0.2 0.8 0 1.2c-0.2 0.4-0.5 0.7-0.9 0.9c-0.4 0.2-0.8 0.2-1.2 0 c-0.4-0.2-0.7-0.5-0.9-0.9c-0.2-0.4-0.2-0.8 0-1.2C21.4 17 21.7 16.7 22.2 16.5z"/><path fill="#3F3F3F" d="M18.9 11.2c0-0.1 0-0.2-0.1-0.3c-0.1-0.1-0.2-0.1-0.3-0.2l-2.2-0.3c-0.1-0.3-0.3-0.7-0.5-1.2 C16 9 16.2 8.7 16.5 8.3s0.5-0.6 0.6-0.8c0.1-0.1 0.1-0.2 0.1-0.3c0-0.3-0.7-1.1-2.1-2.4c-0.1-0.1-0.2-0.1-0.3-0.1 c-0.1 0-0.2 0-0.3 0.1l-1.7 1.3c-0.4-0.2-0.8-0.4-1.1-0.5l-0.3-2.3c0-0.1-0.1-0.2-0.1-0.3C11 3.1 10.9 3 10.8 3H8.1 C7.9 3 7.7 3.2 7.6 3.4C7.5 3.9 7.4 4.6 7.3 5.7C6.9 5.8 6.5 6 6.2 6.2L4.5 4.8C4.4 4.8 4.3 4.7 4.2 4.7C4 4.7 3.6 5 3 5.6 c-0.6 0.6-1 1-1.2 1.3C1.7 7 1.7 7.1 1.7 7.2c0 0.1 0 0.2 0.1 0.3c0.6 0.7 1 1.2 1.3 1.7C2.9 9.6 2.7 10 2.6 10.3l-2.3 0.4 c-0.1 0-0.2 0.1-0.2 0.2C0 10.9 0 11 0 11.1v2.7c0 0.1 0 0.2 0.1 0.3c0.1 0.1 0.2 0.1 0.3 0.1l2.2 0.4c0.1 0.4 0.3 0.8 0.5 1.2 c-0.2 0.2-0.4 0.5-0.7 0.9c-0.3 0.4-0.5 0.6-0.6 0.8c-0.1 0.1-0.1 0.2-0.1 0.3c0 0.3 0.7 1.1 2.1 2.4c0.1 0.1 0.2 0.1 0.3 0.1 c0.1 0 0.2 0 0.3-0.1l1.7-1.3c0.4 0.2 0.8 0.4 1.1 0.5l0.3 2.3c0 0.1 0.1 0.2 0.1 0.3C7.9 21.9 8 22 8.1 22h2.8 c0.2 0 0.4-0.1 0.4-0.4c0.1-0.5 0.2-1.2 0.3-2.3c0.4-0.1 0.8-0.3 1.1-0.5l1.7 1.3c0.1 0.1 0.2 0.1 0.3 0.1c0.2 0 0.6-0.3 1.2-0.9 c0.6-0.6 1-1 1.2-1.3c0.1-0.1 0.1-0.2 0.1-0.3c0-0.1 0-0.2-0.1-0.3c-0.6-0.7-1-1.2-1.3-1.7c0.2-0.4 0.4-0.8 0.5-1.1l2.3-0.4 c0.1 0 0.2-0.1 0.2-0.2c0.1-0.1 0.1-0.2 0.1-0.3L18.9 11.2L18.9 11.2z M12.1 15.2c-0.7 0.7-1.6 1.1-2.7 1.1s-1.9-0.4-2.7-1.1 c-0.7-0.7-1.1-1.6-1.1-2.7S6 10.6 6.8 9.8c0.7-0.7 1.6-1.1 2.7-1.1s1.9 0.4 2.7 1.1c0.7 0.7 1.1 1.6 1.1 2.7S12.9 14.4 12.1 15.2z"/><circle fill="#3F3F3F" cx="9.5" cy="12.5" r="2"/></svg>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ request_status_code_color }}" title="{{ collector.statustext }}">{{ collector.statuscode }}</span>
|
||||
<span class="sf-toolbar-status sf-toolbar-info-piece-additional">{{ request_handler }}</span>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ request_status_code_color }}">{{ collector.statuscode }}</span>
|
||||
{% if collector.route %}
|
||||
<span class="sf-toolbar-label">@</span>
|
||||
<span class="sf-toolbar-value sf-toolbar-info-piece-additional">{{ collector.route }}</span>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
{% spaceless %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Status</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ request_status_code_color }}">{{ collector.statuscode }}</span> {{ collector.statustext }}
|
||||
<b>HTTP status</b>
|
||||
<span>{{ collector.statuscode }} {{ collector.statustext }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Controller</b>
|
||||
{{ request_handler }}
|
||||
<span>{{ request_handler }}</span>
|
||||
</div>
|
||||
{% if collector.controller.class is defined %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Controller class</b>
|
||||
<span>{{ collector.controller.class }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Route name</b>
|
||||
<span>{{ request_route }}</span>
|
||||
<span>{{ collector.route|default('NONE') }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Has session</b>
|
||||
@ -43,7 +56,8 @@
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block menu %}
|
||||
|
@ -16,18 +16,28 @@
|
||||
{% endif %}
|
||||
|
||||
{% block toolbar %}
|
||||
{% set duration = collector.events|length ? '%.0f ms'|format(collector.duration) : 'n/a' %}
|
||||
{% set total_time = collector.events|length ? '%.0f'|format(collector.duration) : 'n/a' %}
|
||||
{% set initialization_time = collector.events|length ? '%.0f'|format(collector.inittime) : 'n/a' %}
|
||||
{% set status_color = collector.events|length and collector.duration > 1000 ? 'yellow' : '' %}
|
||||
|
||||
{% set icon %}
|
||||
<svg width="16" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 16 28" enable-background="new 0 0 16 28" xml:space="preserve"><rect x="6" y="4" fill="#3F3F3F" width="4" height="2"/><path fill="#3F3F3F" d="M8 7c-4.4 0-8 3.6-8 8s3.6 8 8 8s8-3.6 8-8S12.4 7 8 7z M12 16H9H7v-6h2v4h3V16z"/></svg>
|
||||
<span>{{ duration }}</span>
|
||||
{{ include('@WebProfiler/Icon/time.svg') }}
|
||||
<span class="sf-toolbar-value">{{ total_time }}</span>
|
||||
<span class="sf-toolbar-label">ms</span>
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Total time</b>
|
||||
<span>{{ duration }}</span>
|
||||
<span>{{ total_time }} ms</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Initialization time</b>
|
||||
<span>{{ initialization_time }} ms</span>
|
||||
</div>
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block menu %}
|
||||
|
@ -5,36 +5,34 @@
|
||||
{% block toolbar %}
|
||||
{% if collector.messages|length %}
|
||||
{% set icon %}
|
||||
<svg width="28" height="28" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 417 300" enable-background="new 0 0 417 300" xml:space="preserve"><g id="Layer_1_1_"><g id="outline_1_"><path fill="#B5B5B6" d="M275.9,145c0,18.2-14.799,33-33,33H120.701l-36.3,42l-0.3-42H40c-18.2,0-33-14.8-33-33V44c0-18.2,14.8-33,33-33h202.9c18.199,0,33,14.8,33,33V145L275.9,145z"/></g><g enable-background="new"><path fill="#FFFFFF" d="M194.501,146.962h-23.898l-9.5-24.715h-43.492l-8.98,24.715H85.326l42.379-108.805h23.23L194.501,146.962zM154.052,103.915L139.06,63.54l-14.695,40.375H154.052z"/></g></g><g id="Layer_2_1_"><g id="japanese"><g id="outline"><path fill="#414141" d="M141.451,214c0,18.2,14.8,33,33,33h122.2l36.301,42l0.301-42h44.1c18.201,0,33-14.8,33-33V113c0-18.2-14.799-33-33-33H174.453c-18.201,0-33,14.8-33,33L141.451,214L141.451,214z"/></g><g enable-background="new"><path fill="#FFFFFF" d="M312.158,143.327c-0.455,1.672-0.912,3.344-1.215,5.016c22.039,6.08,31.766,21.431,31.766,38.455c0,24.318-18.238,40.733-57.301,45.598c-1.217-3.952-5.016-11.248-7.904-15.352c27.359-3.04,45.295-12.159,45.295-29.791c0-5.016-1.672-16.871-18.088-22.19c-6.688,15.199-16.871,29.335-28.727,39.519c0.607,1.976,1.367,3.647,2.127,5.167l-15.654,10.032c-0.76-1.521-1.52-3.192-2.129-5.017c-7.6,4.256-15.959,6.992-24.471,6.992c-13.375,0-22.189-8.512-22.189-22.647c0-20.975,16.111-37.542,37.693-46.357c-0.305-6.536-0.305-13.223-0.305-20.215c-11.398,0.304-23.711,0.608-29.789,0.456l-0.912-17.783c6.99,0.152,19.758,0.152,31.006,0.152c0.305-6.536,0.457-14.135,0.76-20.519l23.863,1.824c-0.305,1.52-1.52,2.736-4.104,3.04c-0.457,4.408-0.76,10.184-1.217,15.047c16.568-0.76,37.391-2.736,54.262-6.384l1.672,18.391c-16.719,3.04-38.605,4.56-56.846,5.168c-0.15,5.319-0.303,10.487-0.303,15.503c6.383-1.52,15.654-2.432,22.799-1.976c0.607-2.28,1.063-4.56,1.215-6.84L312.158,143.327z M255.77,198.044c-1.672-8.056-2.736-17.479-3.496-27.814c-12.008,5.927-20.215,15.199-20.215,25.382c0,8.664,6.535,8.36,8.512,8.209C245.281,203.668,250.449,201.539,255.77,198.044zM286.473,162.021c-2.129-0.304-10.033,0.305-16.871,2.128c0.455,7.6,0.91,14.591,1.975,20.671C277.504,178.589,282.672,170.686,286.473,162.021z"/></g></g></g></svg>
|
||||
{% if collector.countMissings %}
|
||||
{% set status_color = "red" %}
|
||||
{% elseif collector.countFallbacks %}
|
||||
{% set status_color = "yellow" %}
|
||||
{% endif %}
|
||||
{{ include('@WebProfiler/Icon/translation.svg') }}
|
||||
{% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' : '' %}
|
||||
{% set error_count = collector.countMissings + collector.countFallbacks %}
|
||||
<span class="sf-toolbar-status{% if status_color is defined %} sf-toolbar-status-{{ status_color }}{% endif %}">{{ error_count ?: collector.countdefines }}</span>
|
||||
<span class="sf-toolbar-value">{{ error_count ?: collector.countdefines }}</span>
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
{% if collector.countMissings %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Missing messages</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-red">{{ collector.countMissings }}</span>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.countMissings ? 'red' }}">
|
||||
{{ collector.countMissings }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if collector.countFallbacks %}
|
||||
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Fallback messages</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-yellow">{{ collector.countFallbacks }}</span>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.countFallbacks ? 'yellow' }}">
|
||||
{{ collector.countFallbacks }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if collector.countdefines %}
|
||||
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Defined messages</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-green">{{ collector.countdefines }}</span>
|
||||
<span class="sf-toolbar-status">{{ collector.countdefines }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -1,30 +1,33 @@
|
||||
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
||||
|
||||
{% block toolbar %}
|
||||
{% set time = collector.templatecount ? '%0.0f ms'|format(collector.time) : 'n/a' %}
|
||||
{% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %}
|
||||
{% set icon %}
|
||||
<img height="28" alt="Twig" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAcCAYAAACOGPReAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAbElEQVRIx2NgGAXUBowMDAwMaWlp/6ll4KxZsxhZYJy0tDRqGMjAwMDAwEQL77OgCxSXlJBsSG9PDwqfJi6lj/fRvTJ4XYocUTBXE4q8oRtRRBnKwsw8RFw6fA0lKkd1dnYOIpfCCthRMIIAAI0IFu9Hxh7ZAAAAAElFTkSuQmCC" />
|
||||
<span class="sf-toolbar-status">{{ time }}</span>
|
||||
{{ include('@WebProfiler/Icon/twig.svg') }}
|
||||
<span class="sf-toolbar-value">{{ time }}</span>
|
||||
<span class="sf-toolbar-label">ms</span>
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Render Time</b>
|
||||
<span>{{ time }}</span>
|
||||
<span>{{ time }} ms</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Template Calls</b>
|
||||
<span>{{ collector.templatecount }}</span>
|
||||
<span class="sf-toolbar-status">{{ collector.templatecount }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Block Calls</b>
|
||||
<span>{{ collector.blockcount }}</span>
|
||||
<span class="sf-toolbar-status">{{ collector.blockcount }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Macro Calls</b>
|
||||
<span>{{ collector.macrocount }}</span>
|
||||
<span class="sf-toolbar-status">{{ collector.macrocount }}</span>
|
||||
</div>
|
||||
{% endset %}
|
||||
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block menu %}
|
||||
|
@ -0,0 +1,6 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M9.8,18l-3.8,4.4c-0.3,0.3-0.8,0.4-1.1,0L1,18c-0.4-0.5-0.1-1,0.5-1H3V6.4C3,3.8,5.5,2,8.2,2h3.9
|
||||
c1.1,0,2,0.9,2,2s-0.9,2-2,2H8.2C7.7,6,7,6,7,6.4V17h2.2C9.8,17,10.2,17.5,9.8,18z M23,6l-3.8-4.5c-0.3-0.3-0.8-0.3-1.1,0L14.2,6
|
||||
c-0.4,0.5-0.1,1,0.5,1H17v10.6c0,0.4-0.7,0.4-1.2,0.4h-3.9c-1.1,0-2,0.9-2,2s0.9,2,2,2h3.9c2.6,0,5.2-1.8,5.2-4.4V7h1.5
|
||||
C23.1,7,23.4,6.5,23,6z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 562 B |
@ -0,0 +1,5 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M21.1,18.3c0.8,0.8,0.8,2,0,2.8c-0.4,0.4-0.9,0.6-1.4,0.6s-1-0.2-1.4-0.6L12,14.8l-6.3,6.3
|
||||
c-0.4,0.4-0.9,0.6-1.4,0.6s-1-0.2-1.4-0.6c-0.8-0.8-0.8-2,0-2.8L9.2,12L2.9,5.7c-0.8-0.8-0.8-2,0-2.8c0.8-0.8,2-0.8,2.8,0L12,9.2
|
||||
l6.3-6.3c0.8-0.8,2-0.8,2.8,0c0.8,0.8,0.8,2,0,2.8L14.8,12L21.1,18.3z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 481 B |
@ -0,0 +1,6 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M20.5,4H18V2.5C18,1.7,17.3,1,16.5,1h-9C6.7,1,6,1.7,6,2.5V4H3.5C2.7,4,2,4.7,2,5.5v16C2,22.3,2.7,23,3.5,
|
||||
23h17c0.8,0,1.5-0.7,1.5-1.5v-16C22,4.7,21.3,4,20.5,4z M9,4h6v1H9V4z M19,20H5V7h1.1c0.2,0.6,0.8,1,1.4,1h9c0.7,0,1.2-0.4,1.4-1H19
|
||||
V20z M17,11c0,0.6-0.4,1-1,1H8c-0.6,0-1-0.4-1-1s0.4-1,1-1h8C16.6,10,17,10.4,17,11z M17,14c0,0.6-0.4,1-1,1H8c-0.6,0-1-0.4-1-1
|
||||
s0.4-1,1-1h8C16.6,13,17,13.4,17,14z M13,17c0,0.6-0.4,1-1,1H8c-0.6,0-1-0.4-1-1s0.4-1,1-1h4C12.6,16,13,16.4,13,17z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 676 B |
@ -0,0 +1,7 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M21,4v13.8c0,2.7-2.5,5.2-5.2,5.2H6c-0.6,0-1-0.4-1-1s0.4-1,1-1h9.8c1.6,0,3.2-1.7,3.2-3.2V4
|
||||
c0-0.6,0.4-1,1-1S21,3.4,21,4z M5.5,20C4.1,20,3,18.9,3,17.5V3.5C3,2.1,4.1,1,5.5,1h10.1C16.9,1,18,2.1,18,3.5v14.1
|
||||
c0,1.4-1.1,2.5-2.5,2.5H5.5z M9,11.4C9,11.7,9.3,12,9.6,12h1.8c0.3,0,0.6-0.3,0.6-0.6V4.6C12,4.3,11.7,4,11.4,4H9.6
|
||||
C9.3,4,9,4.3,9,4.6V11.4z M9,16.4C9,16.7,9.3,17,9.6,17h1.8c0.3,0,0.6-0.3,0.6-0.6v-1.8c0-0.3-0.3-0.6-0.6-0.6H9.6
|
||||
C9.3,14,9,14.3,9,14.6V16.4z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 661 B |
@ -0,0 +1,5 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M6,18.9V15h12v3.9c0,0.7-0.2,1.1-1,1.1H7C6.2,20,6,19.6,6,18.9z M20,1C20,1,20,1,20,1c-0.6,0-1,0.5-1,1.1
|
||||
l0,18c0,0.5-0.4,0.9-0.9,0.9H5.9C5.4,21,5,20.6,5,20.1l0-18C5,1.5,4.6,1,4,1c0,0,0,0,0,0C3.5,1,3,1.5,3,2.1l0,18
|
||||
C3,21.7,4.3,23,5.9,23h12.2c1.6,0,2.9-1.3,2.9-2.9l0-18C21,1.5,20.6,1,20,1z M18,9H6v5h12V9z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 501 B |
@ -0,0 +1,12 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M12,0.9C5.8,0.9,0.9,5.8,0.9,12s5,11.1,11.1,11.1s11.1-5,11.1-11.1S18.2,0.9,12,0.9z M18.5,6.9
|
||||
c-0.6,0-0.9-0.3-0.9-0.8c0-0.2,0-0.4,0.2-0.6c0.1-0.3,0.2-0.3,0.2-0.4c0-0.3-0.5-0.4-0.6-0.4c-1.8,0.1-2.3,2.5-2.7,4.4l-0.2,1
|
||||
c1,0.2,1.8,0,2.2-0.3c0.6-0.4-0.2-0.7-0.1-1.2c0.1-0.3,0.5-0.5,0.7-0.6c0.5,0,0.7,0.5,0.7,0.9c0,0.7-1,1.8-3,1.8
|
||||
c-0.3,0-0.5,0-0.6-0.1L13.8,13c-0.4,1.6-0.8,3.8-2.4,5.7c-1.4,1.7-2.9,1.9-3.5,1.9c-1.2,0-1.9-0.6-2-1.5c0-0.8,0.7-1.3,1.2-1.3
|
||||
c0.6,0,1.1,0.5,1.1,1c0,0.5-0.2,0.6-0.4,0.6c-0.1,0.1-0.3,0.2-0.3,0.4c0,0.1,0.1,0.3,0.4,0.3c0.5,0,0.8-0.3,1.1-0.5
|
||||
c1.2-0.9,1.6-2.7,2.2-5.7l0.1-0.7c0.2-1,0.5-2.1,0.7-3.2c-0.8-0.6-1.3-1.4-2.4-1.7C9,8.2,8.5,8.4,8.1,8.8c-0.4,0.5-0.2,1.1,0.2,1.5
|
||||
L9,10.9c0.7,0.8,1.2,1.6,1,2.5C9.7,14.9,8,16,6,15.3c-1.8-0.6-2-1.8-1.8-2.5c0.2-0.6,0.6-0.7,1.1-0.6c0.5,0.2,0.6,0.7,0.6,1.2
|
||||
c0,0.1,0,0.1-0.1,0.3c-0.2,0.1-0.3,0.3-0.3,0.4c-0.1,0.4,0.4,0.6,0.7,0.7c0.7,0.3,1.6-0.2,1.8-0.8c0.2-0.6-0.2-1-0.4-1.1l-0.7-0.8
|
||||
c-0.4-0.4-1.1-1.4-0.7-2.6C6.3,9,6.6,8.6,6.9,8.2c0.9-0.6,1.8-0.7,2.8-0.6c1.2,0.4,1.8,1.1,2.6,1.8c0.5-1.2,1-2.4,1.8-3.5
|
||||
C15,5,16,4.3,17.2,4.2c1.3,0.2,2.2,0.7,2.2,1.6C19.4,6.2,19.2,6.9,18.5,6.9z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,5 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M15.1,4.3c-2.1-0.5-4.2-0.5-6.2,0C8.6,4.3,8.2,4.1,8.2,3.8V3.4c0-1.2,1-2.3,2.3-2.3h3c1.2,0,2.3,1,2.3,2.3
|
||||
v0.3C15.8,4.1,15.4,4.3,15.1,4.3z M20.9,14c0,4.9-4,8.9-8.9,8.9s-8.9-4-8.9-8.9s4-8.9,8.9-8.9S20.9,9.1,20.9,14z M16.7,15
|
||||
c0-0.6-0.4-1-1-1H13V8.4c0-0.6-0.4-1-1-1s-1,0.4-1,1v6.2c0,0.6,0.4,1.3,1,1.3h3.7C16.2,16,16.7,15.6,16.7,15z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 527 B |
@ -0,0 +1,13 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M5.4,6H7v0.3c0,1.2-0.7,1.9-1.7,1.9c-1.1,0-1.4-0.4-1.4-1.1C3.9,6.2,4.5,6,5.4,6z M9.2,0H2.7
|
||||
C1.2,0,0,0.9,0,2.4v6.5C0,10.4,1.2,11,2.7,11h1.2l3.3,3.2C7.6,14.4,8,14.5,8,14.1c0-1.4,0-2.8,0-4.2c0-0.4,0-0.7,0.1-1.1
|
||||
c-0.1,0-0.3,0-0.4,0C7.4,8.9,7,8.7,7,8.4V7.9c0,0.7-1,1-1.8,1c-1.5,0-2.4-0.7-2.4-2c0-1.3,1.1-2,2.6-2H7V4.5c0-1-0.4-1.6-1.5-1.6
|
||||
C4.8,2.9,4.4,3.1,4,3.6C3.8,3.8,3.8,3.8,3.7,3.8c-0.2,0-0.4-0.2-0.4-0.4c0-0.1,0-0.2,0.1-0.2C3.8,2.5,4.4,2,5.6,2C7.2,2,8,3,8,4.5v3
|
||||
c1-1.4,1.8-2.4,4-2.4c0,0,0-1.9,0-2.7C12,0.9,10.7,0,9.2,0z M20.7,6h-8C10.8,6,9,7.2,9,9v8c0,1.8,2,3.3,4,3.3v3
|
||||
c0,0.5,0.5,0.7,0.9,0.3l4-3.7h2.7c1.8,0,3.3-1.2,3.3-3V9C24,7.2,22.5,6,20.7,6z M13,9c0,0,0.6,0,1.1,0h4.8C19.3,9,20,9,20,9v0.8
|
||||
c0,0-0.7,0.3-1.1,0.3h-4.8C13.7,10,13,9.7,13,9.7V9z M12.5,16.9c-0.2-0.2-0.3-0.3-0.6-0.5c1-0.8,1.8-2.1,2.2-3.4l0.7,0.3
|
||||
C14.2,14.8,13.4,15.9,12.5,16.9z M17,12v4.8c0,0.7-0.2,0.8-1.2,0.8c-0.4,0-1,0-1.4-0.1c0-0.3-0.1-0.4-0.2-0.7
|
||||
c0.6,0.1,0.9,0.1,1.4,0.1c0.4,0,0.4,0,0.4-0.3V12h-2.9c-0.4,0-1.1,0.1-1.1,0.1v-0.8c0,0,0.7-0.4,1.1-0.4h6.8c0.5,0,1.1,0.4,1.1,0.4
|
||||
v0.8c0,0-0.6-0.1-1.1-0.1H17z M20.7,16.8c-1-1.1-1.6-1.9-2.3-3.6L19,13c0.5,1.1,0.8,1.7,1.4,2.4c0.3,0.3,0.5,0.5,0.8,0.9
|
||||
C21.1,16.4,20.9,16.6,20.7,16.8z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,5 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M20.1,1H3.9C2.3,1,1,2.3,1,3.9v16.3C1,21.7,2.3,23,3.9,23h16.3c1.6,0,2.9-1.3,2.9-2.9V3.9
|
||||
C23,2.3,21.7,1,20.1,1z M21,20.1c0,0.5-0.4,0.9-0.9,0.9H3.9C3.4,21,3,20.6,3,20.1V3.9C3,3.4,3.4,3,3.9,3h16.3C20.6,3,21,3.4,21,3.9
|
||||
V20.1z M5,5h14v3H5V5z M5,10h3v9H5V10z M10,10h9v9h-9V10z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 470 B |
@ -86,6 +86,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax');
|
||||
var tbodies = document.querySelectorAll('.sf-toolbar-ajax-request-list');
|
||||
var state = 'ok';
|
||||
if (tbodies.length) {
|
||||
@ -165,31 +166,24 @@
|
||||
tbody.appendChild(rows);
|
||||
|
||||
if (infoSpan) {
|
||||
var text = requestStack.length + ' call' + (requestStack.length > 1 ? 's' : '');
|
||||
var text = requestStack.length + ' AJAX request' + (requestStack.length > 1 ? 's' : '');
|
||||
infoSpan.textContent = text;
|
||||
}
|
||||
} else {
|
||||
var cell = document.createElement('td');
|
||||
cell.setAttribute('colspan', '4');
|
||||
cell.textContent = "No AJAX requests yet.";
|
||||
var row = document.createElement('tr');
|
||||
row.appendChild(cell);
|
||||
tbody.appendChild(row);
|
||||
ajaxToolbarPanel.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
requestCounter[0].textContent = requestStack.length;
|
||||
|
||||
var className = 'sf-toolbar-ajax-requests sf-toolbar-status';
|
||||
if (state == 'ok') {
|
||||
className += ' sf-toolbar-status-green';
|
||||
} else if (state == 'error') {
|
||||
className += ' sf-toolbar-status-red';
|
||||
} else {
|
||||
className += ' sf-ajax-request-loading';
|
||||
}
|
||||
|
||||
var className = 'sf-toolbar-ajax-requests sf-toolbar-value';
|
||||
requestCounter[0].className = className;
|
||||
|
||||
if (state == 'error') {
|
||||
Sfjs.addClass(ajaxToolbarPanel, 'sf-toolbar-status-red');
|
||||
} else {
|
||||
Sfjs.addClass(ajaxToolbarPanel, 'sf-ajax-request-loading');
|
||||
}
|
||||
};
|
||||
|
||||
var addEventListener;
|
||||
|
@ -179,7 +179,7 @@ pre, code {
|
||||
width: 250px;
|
||||
margin-left: -100%;
|
||||
}
|
||||
table td {
|
||||
#collector-content table td {
|
||||
background-color: white;
|
||||
}
|
||||
h1 {
|
||||
@ -273,15 +273,15 @@ ul.alt li {
|
||||
ul.alt li.even {
|
||||
background: #f1f7e2;
|
||||
}
|
||||
ul.alt li.error, tr.error td {
|
||||
ul.alt li.error {
|
||||
background-color: #f66;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
ul.alt li.warning, tr.warning td {
|
||||
ul.alt li.warning {
|
||||
background-color: #ffcc00;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
ul.alt li.scream, ul.alt li.scream strong, tr.scream td, tr.scream strong {
|
||||
ul.alt li.scream, ul.alt li.scream strong {
|
||||
color: gray;
|
||||
}
|
||||
ul.sf-call-stack li {
|
||||
|
@ -1,21 +1,12 @@
|
||||
.sf-minitoolbar {
|
||||
display: none;
|
||||
|
||||
position: fixed;
|
||||
background-color: #222;
|
||||
bottom: 0;
|
||||
display: none;
|
||||
height: 36px;
|
||||
padding: 5px 6px 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
|
||||
padding: 5px 5px 0;
|
||||
|
||||
background-color: #f7f7f7;
|
||||
background-image: -moz-linear-gradient(top, #e4e4e4, #ffffff);
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e4e4e4), to(#ffffff));
|
||||
background-image: -o-linear-gradient(top, #e4e4e4, #ffffff);
|
||||
background: linear-gradient(top, #e4e4e4, #ffffff);
|
||||
|
||||
border-radius: 16px 0 0 0;
|
||||
|
||||
z-index: 6000000;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.sf-toolbarreset * {
|
||||
@ -26,127 +17,135 @@
|
||||
}
|
||||
|
||||
.sf-toolbarreset {
|
||||
position: fixed;
|
||||
background-color: #f7f7f7;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
padding: 0 40px 0 0;
|
||||
z-index: 6000000;
|
||||
font: 11px Verdana, Arial, sans-serif;
|
||||
text-align: left;
|
||||
color: #2f2f2f;
|
||||
|
||||
background-image: -moz-linear-gradient(top, #e4e4e4, #ffffff);
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e4e4e4), to(#ffffff));
|
||||
background-image: -o-linear-gradient(top, #e4e4e4, #ffffff);
|
||||
background: linear-gradient(top, #e4e4e4, #ffffff);
|
||||
|
||||
background-color: #222;
|
||||
bottom: 0;
|
||||
border-top: 1px solid #bbb;
|
||||
box-shadow: 0 -1px 0px rgba(0, 0, 0, 0.2);
|
||||
color: #EEE;
|
||||
font: 11px Arial, sans-serif;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
padding: 0 36px 0 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
text-align: left;
|
||||
z-index: 99999;
|
||||
}
|
||||
.sf-toolbarreset abbr {
|
||||
border-bottom: 1px dotted #000000;
|
||||
cursor: help;
|
||||
}
|
||||
.sf-toolbarreset span,
|
||||
.sf-toolbarreset div,
|
||||
.sf-toolbarreset td,
|
||||
.sf-toolbarreset th {
|
||||
font-size: 11px;
|
||||
border: dashed #777;
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.sf-toolbarreset svg,
|
||||
.sf-toolbarreset img {
|
||||
width: auto;
|
||||
display: inline;
|
||||
}
|
||||
.sf-toolbarreset table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
background-color: #000;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
width: 100%;
|
||||
table-layout: auto;
|
||||
max-height: 20px;
|
||||
}
|
||||
|
||||
.sf-toolbarreset .hide-button {
|
||||
background: #444;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
cursor: pointer;
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAAllBMVEXDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PExMTPz8/Q0NDR0dHT09Pb29vc3Nzf39/h4eHi4uLj4+P6+vr7+/v8/Pz9/f3///+Nh2QuAAAAIXRSTlMABgwPGBswMzk8QktRV4SKjZOWmaKlq7TAxszb3urt+fy1vNEpAAAAiklEQVQIHUXBBxKCQBREwRFzDqjoGh+C2YV//8u5Sll2S0E/dof1tKdKM6GyqCto7PjZRJIS/mbSELgXOSd/BzpKIH1ZefVWpDDTHsi8mZVnwImPi5ndCLbaAZk3M58Bay0h9VbeSvMpjDUAHj4jL55AW1rxN5fU2PLjIgVRzNdxVFOlGzvnJi0Fb1XNGBHA9uQOAAAAAElFTkSuQmCC');
|
||||
background-repeat: no-repeat;
|
||||
background-position: 13px 11px;
|
||||
text-align: center;
|
||||
}
|
||||
.sf-toolbarreset .hide-button svg {
|
||||
max-height: 18px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block {
|
||||
white-space: nowrap;
|
||||
color: #2f2f2f;
|
||||
display: block;
|
||||
min-height: 28px;
|
||||
border-bottom: 1px solid #e4e4e4;
|
||||
border-right: 1px solid #e4e4e4;
|
||||
padding: 0;
|
||||
float: left;
|
||||
cursor: default;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 36px;
|
||||
margin-right: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.sf-toolbar-block > a,
|
||||
.sf-toolbar-block > a:hover {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sf-toolbar-block span {
|
||||
display: inline-block;
|
||||
}
|
||||
.sf-toolbar-block .sf-toolbar-value {
|
||||
color: #F5F5F5;
|
||||
font-size: 13px;
|
||||
line-height: 36px;
|
||||
padding: 0;
|
||||
}
|
||||
.sf-toolbar-block .sf-toolbar-label,
|
||||
.sf-toolbar-block .sf-toolbar-class-separator {
|
||||
color: #AAA;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info {
|
||||
border-collapse: collapse;
|
||||
display: table;
|
||||
z-index: 100000;
|
||||
}
|
||||
.sf-toolbar-block hr {
|
||||
border-top: 1px solid #777;
|
||||
margin: 4px 0;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.sf-toolbar-block .sf-toolbar-info-piece {
|
||||
line-height: 19px;
|
||||
margin-bottom: 5px;
|
||||
/* this 'border-bottom' trick is needed because 'margin-bottom' doesn't work for table rows */
|
||||
border-bottom: solid transparent 3px;
|
||||
display: table-row;
|
||||
}
|
||||
.sf-toolbar-block .sf-toolbar-info-piece-additional,
|
||||
.sf-toolbar-block .sf-toolbar-info-piece-additional-detail {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status {
|
||||
padding: 0px 5px;
|
||||
border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin-bottom: 0px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status + .sf-toolbar-status {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info-piece:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info-piece a,
|
||||
.sf-toolbar-block .sf-toolbar-info-piece abbr {
|
||||
color: #2f2f2f;
|
||||
.sf-toolbar-block .sf-toolbar-info-piece a {
|
||||
color: #99CDD8;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.sf-toolbar-block .sf-toolbar-info-piece a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info-piece b {
|
||||
display: inline-block;
|
||||
min-width: 110px;
|
||||
vertical-align: top;
|
||||
color: #AAA;
|
||||
display: table-cell;
|
||||
font-size: 11px;
|
||||
padding: 4px 8px 4px 0;
|
||||
}
|
||||
.sf-toolbar-block .sf-toolbar-info-piece span {
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info-with-next-pointer:after {
|
||||
content: ' :: ';
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info-with-delimiter {
|
||||
border-right: 1px solid #999;
|
||||
padding-right: 5px;
|
||||
.sf-toolbar-block .sf-toolbar-info-piece span {
|
||||
color: #F5F5F5;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info {
|
||||
background-color: #444;
|
||||
bottom: 36px;
|
||||
color: #F5F5F5;
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
border: 1px solid #bbb;
|
||||
padding: 9px 0;
|
||||
margin-left: -1px;
|
||||
|
||||
bottom: 38px;
|
||||
border-bottom-width: 0;
|
||||
border-bottom: 1px solid #bbb;
|
||||
border-radius: 4px 4px 0 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info:empty {
|
||||
@ -155,154 +154,131 @@
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-status {
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
color: #FFF;
|
||||
background-color: #666;
|
||||
padding: 3px 6px;
|
||||
border-radius: 3px;
|
||||
margin-bottom: 2px;
|
||||
vertical-align: middle;
|
||||
min-width: 6px;
|
||||
min-height: 13px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-status abbr {
|
||||
color: #fff;
|
||||
border-bottom: 1px dotted black;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-status-green {
|
||||
background-color: #759e1a;
|
||||
background-color: rgba(117, 158, 43, 0.8);
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-status-red {
|
||||
background-color: #a33;
|
||||
background-color: rgba(200, 43, 43, 0.8);
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-status-yellow {
|
||||
background-color: #ffcc00;
|
||||
color: #000;
|
||||
background-color: rgb(189, 132, 0);
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-status-black {
|
||||
background-color: #000;
|
||||
.sf-toolbar-block.sf-toolbar-status-green {
|
||||
background-color: rgba(117, 158, 43, 0.8);
|
||||
color: #FFF;
|
||||
}
|
||||
.sf-toolbar-block.sf-toolbar-status-red {
|
||||
background-color: rgba(200, 43, 43, 0.8);
|
||||
color: #FFF;
|
||||
}
|
||||
.sf-toolbar-block.sf-toolbar-status-yellow {
|
||||
background-color: rgb(189, 132, 0);
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.sf-toolbar-block-request .sf-toolbar-status {
|
||||
color: #FFF;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.sf-toolbar-block-request .sf-toolbar-info-piece a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.sf-toolbar-block-request .sf-toolbar-info-piece a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.sf-toolbar-status-green .sf-toolbar-label,
|
||||
.sf-toolbar-status-yellow .sf-toolbar-label,
|
||||
.sf-toolbar-status-red .sf-toolbar-label {
|
||||
color: #FFF;
|
||||
}
|
||||
.sf-toolbar-status-green svg path,
|
||||
.sf-toolbar-status-red svg path,
|
||||
.sf-toolbar-status-yellow svg path {
|
||||
fill: #FFF;
|
||||
}
|
||||
.sf-toolbar-block-config svg path {
|
||||
fill: #FFF;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-icon {
|
||||
display: block;
|
||||
height: 36px;
|
||||
padding: 0 7px;
|
||||
}
|
||||
.sf-toolbar-block-request .sf-toolbar-icon {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-icon > a,
|
||||
.sf-toolbar-block .sf-toolbar-icon > span {
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
margin: 0;
|
||||
padding: 5px 8px;
|
||||
min-width: 20px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-icon > a,
|
||||
.sf-toolbar-block .sf-toolbar-icon > a:link
|
||||
.sf-toolbar-block .sf-toolbar-icon > a:hover {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-icon > a[href]:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-icon img, .sf-toolbar-block .sf-toolbar-icon svg {
|
||||
.sf-toolbar-block .sf-toolbar-icon img,
|
||||
.sf-toolbar-block .sf-toolbar-icon svg {
|
||||
border-width: 0;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
top: 8px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-icon img + span, .sf-toolbar-block .sf-toolbar-icon svg + span {
|
||||
margin-left: 5px;
|
||||
margin-top: 2px;
|
||||
.sf-toolbar-block .sf-toolbar-icon img + span,
|
||||
.sf-toolbar-block .sf-toolbar-icon svg + span {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-icon .sf-toolbar-status {
|
||||
border-radius: 12px;
|
||||
border-bottom-left-radius: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info-method {
|
||||
border-bottom: 1px dashed #ccc;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info-method[onclick=""] {
|
||||
border-bottom: none;
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
.sf-toolbar-info-php {}
|
||||
.sf-toolbar-info-php-ext {}
|
||||
|
||||
.sf-toolbar-info-php-ext .sf-toolbar-status {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.sf-toolbar-info-php-ext .sf-toolbar-status:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.sf-toolbar-block a .sf-toolbar-info-piece-additional,
|
||||
.sf-toolbar-block a .sf-toolbar-info-piece-additional-detail {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.sf-toolbar-block a .sf-toolbar-info-piece-additional:empty,
|
||||
.sf-toolbar-block a .sf-toolbar-info-piece-additional-detail:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sf-toolbarreset:hover {
|
||||
box-shadow: rgba(0, 0, 0, 0.3) 0 0 50px;
|
||||
.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-value {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block:hover {
|
||||
box-shadow: rgba(0, 0, 0, 0.35) 0 0 5px;
|
||||
border-right: none;
|
||||
margin-right: 1px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sf-toolbar-block:hover .sf-toolbar-icon {
|
||||
background-color: #fff;
|
||||
border-top: 1px dotted #DDD;
|
||||
background-color: #444;
|
||||
position: relative;
|
||||
margin-top: -1px;
|
||||
z-index: 10002;
|
||||
}
|
||||
|
||||
.sf-toolbar-block:hover .sf-toolbar-info {
|
||||
display: block;
|
||||
min-width: -webkit-calc(100% + 2px);
|
||||
min-width: calc(100% + 2px);
|
||||
z-index: 10001;
|
||||
box-sizing: border-box;
|
||||
padding: 9px;
|
||||
line-height: 19px;
|
||||
|
||||
padding: 10px;
|
||||
max-width: 480px;
|
||||
max-height: 480px;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sf-toolbar-ajax-requests th, .sf-toolbar-ajax-requests td {
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 0 4px;
|
||||
color: #2f2f2f;
|
||||
background-color: #fff;
|
||||
.sf-toolbar-info-piece b.sf-toolbar-ajax-info {
|
||||
color: #F5F5F5;
|
||||
}
|
||||
.sf-toolbar-ajax-requests {
|
||||
width: 100%;
|
||||
}
|
||||
.sf-toolbar-ajax-requests td {
|
||||
background-color: #444;
|
||||
border-bottom: 1px solid #777;
|
||||
color: #F5F5F5;
|
||||
font-size: 12px;
|
||||
padding: 4px;
|
||||
}
|
||||
.sf-toolbar-ajax-requests tr:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
.sf-toolbar-ajax-requests th {
|
||||
background-color: #eee;
|
||||
background-color: #222;
|
||||
border-bottom: 0;
|
||||
color: #AAA;
|
||||
font-size: 11px;
|
||||
padding: 4px;
|
||||
}
|
||||
.sf-ajax-request-url {
|
||||
max-width: 300px;
|
||||
@ -310,12 +286,15 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.sf-toolbar-ajax-requests .sf-ajax-request-url a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.sf-toolbar-ajax-requests .sf-ajax-request-url a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.sf-ajax-request-duration {
|
||||
text-align: right;
|
||||
}
|
||||
.sf-ajax-request-error {
|
||||
color: #a33 !important;
|
||||
}
|
||||
.sf-ajax-request-loading {
|
||||
-webkit-animation: sf-blink .5s ease-in-out infinite;
|
||||
-o-animation: sf-blink .5s ease-in-out infinite;
|
||||
@ -323,121 +302,155 @@
|
||||
animation: sf-blink .5s ease-in-out infinite;
|
||||
}
|
||||
@-webkit-keyframes sf-blink {
|
||||
0% { color: black; }
|
||||
50% { color: #bbb; }
|
||||
100% { color: black; }
|
||||
0% { background: #222; }
|
||||
50% { background: #444; }
|
||||
100% { background: #222; }
|
||||
}
|
||||
@-moz-keyframes sf-blink {
|
||||
0% { color: black; }
|
||||
50% { color: #bbb; }
|
||||
100% { color: black; }
|
||||
}
|
||||
@-o-keyframes sf-blink {
|
||||
0% { color: black; }
|
||||
50% { color: #bbb; }
|
||||
100% { color: black; }
|
||||
0% { background: #222; }
|
||||
50% { background: #444; }
|
||||
100% { background: #222; }
|
||||
}
|
||||
@keyframes sf-blink {
|
||||
0% { color: black; }
|
||||
50% { color: #bbb; }
|
||||
100% { color: black; }
|
||||
0% { background: #222; }
|
||||
50% { background: #444; }
|
||||
100% { background: #222; }
|
||||
}
|
||||
|
||||
/***** Override the setting when the toolbar is on the top *****/
|
||||
.sf-toolbar-block-dump pre.sf-dump {
|
||||
background-color: #222;
|
||||
border-color: #777;
|
||||
border-radius: 0;
|
||||
margin: 6px 0 12px 0;
|
||||
width: 200px;
|
||||
}
|
||||
.sf-toolbar-block-dump pre.sf-dump:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.sf-toolbar-block-dump .sf-toolbar-info-piece .sf-toolbar-file-line {
|
||||
color: #AAA;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.sf-toolbar-block-dump .sf-toolbar-info img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Override the setting when the toolbar is on the top */
|
||||
{% if position == 'top' %}
|
||||
.sf-minitoolbar {
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
right: 0;
|
||||
|
||||
background-color: #f7f7f7;
|
||||
|
||||
background-image: -moz-linear-gradient(225deg, #e4e4e4, #ffffff);
|
||||
background-image: -webkit-gradient(linear, 100% 0%, 0% 0%, from(#e4e4e4), to(#ffffff));
|
||||
background-image: -o-linear-gradient(135deg, #e4e4e4, #ffffff);
|
||||
background: linear-gradient(225deg, #e4e4e4, #ffffff);
|
||||
|
||||
border-radius: 0 0 0 16px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.sf-toolbarreset {
|
||||
background-image: -moz-linear-gradient(225deg, #e4e4e4, #ffffff);
|
||||
background-image: -webkit-gradient(linear, 100% 0%, 0% 0%, from(#e4e4e4), to(#ffffff));
|
||||
background-image: -o-linear-gradient(135deg, #e4e4e4, #ffffff);
|
||||
background: linear-gradient(225deg, #e4e4e4, #ffffff);
|
||||
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
border-bottom: 1px solid #bbb;
|
||||
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2);
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info {
|
||||
top: 39px;
|
||||
bottom: auto;
|
||||
border-top-width: 0;
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block:hover .sf-toolbar-icon {
|
||||
border-top: none;
|
||||
border-bottom: 1px dotted #DDD;
|
||||
margin-top: 0;
|
||||
margin-bottom: -1px;
|
||||
top: 36px;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if not floatable %}
|
||||
.sf-toolbarreset {
|
||||
position: static;
|
||||
background: #cbcbcb;
|
||||
|
||||
background-image: -moz-linear-gradient(90deg, #cbcbcb, #e8e8e8) !important;
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#cbcbcb), to(#e8e8e8)) !important;
|
||||
background-image: -o-linear-gradient(180deg, #cbcbcb, #e8e8e8) !important;
|
||||
background: linear-gradient(90deg, #cbcbcb, #e8e8e8) !important;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
/***** Media query *****/
|
||||
@media screen and (max-width: 779px) {
|
||||
.sf-toolbar-block .sf-toolbar-icon > * > :first-child ~ * {
|
||||
/* Responsive Design */
|
||||
.sf-toolbar-icon .sf-toolbar-label,
|
||||
.sf-toolbar-icon .sf-toolbar-value {
|
||||
display: none;
|
||||
}
|
||||
.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Legacy Design - these styles are maintained to make old panels look
|
||||
a bit better on the new toolbar */
|
||||
.sf-toolbar-block .sf-toolbar-info-piece-additional-detail {
|
||||
color: #AAA;
|
||||
font-size: 12px;
|
||||
}
|
||||
.sf-toolbar-status-green .sf-toolbar-info-piece-additional-detail,
|
||||
.sf-toolbar-status-yellow .sf-toolbar-info-piece-additional-detail,
|
||||
.sf-toolbar-status-red .sf-toolbar-info-piece-additional-detail {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
|
||||
.sf-toolbar-icon .sf-toolbar-label,
|
||||
.sf-toolbar-icon .sf-toolbar-value {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional,
|
||||
.sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional-detail {
|
||||
display: none !important;
|
||||
.sf-toolbar-block .sf-toolbar-icon img,
|
||||
.sf-toolbar-block .sf-toolbar-icon svg {
|
||||
top: 6px;
|
||||
}
|
||||
.sf-toolbar-block-config:hover .sf-toolbar-info {
|
||||
right: 0;
|
||||
}
|
||||
.sf-toolbar-block-time .sf-toolbar-icon svg,
|
||||
.sf-toolbar-block-memory .sf-toolbar-icon svg {
|
||||
display: none;
|
||||
}
|
||||
.sf-toolbar-block-time .sf-toolbar-icon svg + span,
|
||||
.sf-toolbar-block-memory .sf-toolbar-icon svg + span {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-icon {
|
||||
padding: 0 10px;
|
||||
}
|
||||
.sf-toolbar-block-time .sf-toolbar-icon {
|
||||
padding-right: 5px;
|
||||
}
|
||||
.sf-toolbar-block-memory .sf-toolbar-icon {
|
||||
padding-left: 5px;
|
||||
}
|
||||
.sf-toolbar-block-request .sf-toolbar-icon {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.sf-toolbar-block-request .sf-toolbar-status + .sf-toolbar-label {
|
||||
margin-left: 4px;
|
||||
}
|
||||
.sf-toolbar-block-request .sf-toolbar-label + .sf-toolbar-value {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block-request:hover .sf-toolbar-info {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.sf-toolbar-block .sf-toolbar-info-piece b {
|
||||
font-size: 12px;
|
||||
}
|
||||
.sf-toolbar-block .sf-toolbar-info-piece span {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.sf-toolbar-block-config {
|
||||
float: right;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 880px) {
|
||||
.sf-toolbar-block .sf-toolbar-icon a[href$="config"] .sf-toolbar-info-piece-additional {
|
||||
@media (min-width: 1024px) {
|
||||
.sf-toolbar-block .sf-toolbar-info-piece-additional,
|
||||
.sf-toolbar-block .sf-toolbar-info-piece-additional-detail {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 980px) {
|
||||
.sf-toolbar-block .sf-toolbar-icon a[href$="security"] .sf-toolbar-info-piece-additional {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1179px) {
|
||||
.sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional {
|
||||
.sf-toolbar-block .sf-toolbar-info-piece-additional:empty,
|
||||
.sf-toolbar-block .sf-toolbar-info-piece-additional-detail:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1439px) {
|
||||
.sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional-detail {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/***** Media query print: Do not print the Toolbar. *****/
|
||||
@media print {
|
||||
.sf-toolbar {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
@ -15,11 +15,11 @@
|
||||
|
||||
Sfjs.setPreference('toolbar/displayState', 'block');
|
||||
">
|
||||
<svg width="26" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 26 28" enable-background="new 0 0 26 28" xml:space="preserve"><path fill="#010202" d="M13 0C5.8 0 0 5.8 0 13c0 7.2 5.8 13 13 13c7.2 0 13-5.8 13-13C26 5.8 20.2 0 13 0z M20 7.5 c-0.6 0-1-0.3-1-0.9c0-0.2 0-0.4 0.2-0.6c0.1-0.3 0.2-0.3 0.2-0.4c0-0.3-0.5-0.4-0.7-0.4c-2 0.1-2.5 2.7-2.9 4.8l-0.2 1.1 c1.1 0.2 1.9 0 2.4-0.3c0.6-0.4-0.2-0.8-0.1-1.3C18 9.2 18.4 9 18.7 8.9c0.5 0 0.8 0.5 0.8 1c0 0.8-1.1 2-3.3 1.9 c-0.3 0-0.5 0-0.7-0.1L15 14.1c-0.4 1.7-0.9 4.1-2.6 6.2c-1.5 1.8-3.1 2.1-3.8 2.1c-1.3 0-2.1-0.6-2.2-1.6c0-0.9 0.8-1.4 1.3-1.4 c0.7 0 1.2 0.5 1.2 1.1c0 0.5-0.2 0.6-0.4 0.7c-0.1 0.1-0.3 0.2-0.3 0.4c0 0.1 0.1 0.3 0.4 0.3c0.5 0 0.9-0.3 1.2-0.5 c1.3-1 1.7-2.9 2.4-6.2l0.1-0.8c0.2-1.1 0.5-2.3 0.8-3.5c-0.9-0.7-1.4-1.5-2.6-1.8c-0.8-0.2-1.3 0-1.7 0.4C8.4 10 8.6 10.7 9 11.1 l0.7 0.7c0.8 0.9 1.3 1.7 1.1 2.7c-0.3 1.6-2.1 2.8-4.3 2.1c-1.9-0.6-2.2-1.9-2-2.7c0.2-0.6 0.7-0.8 1.2-0.6 c0.5 0.2 0.7 0.8 0.6 1.3c0 0.1 0 0.1-0.1 0.3C6 15 5.9 15.2 5.9 15.3c-0.1 0.4 0.4 0.7 0.8 0.8c0.8 0.3 1.7-0.2 1.9-0.9 c0.2-0.6-0.2-1.1-0.4-1.2l-0.8-0.9c-0.4-0.4-1.2-1.5-0.8-2.8c0.2-0.5 0.5-1 0.9-1.4c1-0.7 2-0.8 3-0.6c1.3 0.4 1.9 1.2 2.8 1.9 c0.5-1.3 1.1-2.6 2-3.8c0.9-1 2-1.7 3.3-1.8C20 4.8 21 5.4 21 6.3C21 6.7 20.8 7.5 20 7.5z"/></svg>
|
||||
{{ include('@WebProfiler/Icon/symfony.svg') }}
|
||||
</a>
|
||||
</div>
|
||||
<style>
|
||||
{% include '@WebProfiler/Profiler/toolbar.css.twig' with { 'position': position, 'floatable': true } %}
|
||||
{{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }}
|
||||
</style>
|
||||
<div id="sfToolbarClearer-{{ token }}" style="clear: both; height: 38px;"></div>
|
||||
{% endif %}
|
||||
@ -30,7 +30,8 @@
|
||||
'collector': profile.getcollector(name),
|
||||
'profiler_url': profiler_url,
|
||||
'token': profile.token,
|
||||
'name': name
|
||||
'name': name,
|
||||
'profiler_markup_version': profiler_markup_version
|
||||
})
|
||||
}}
|
||||
{% endfor %}
|
||||
@ -42,7 +43,9 @@
|
||||
(p.previousElementSibling || p.previousSibling).style.display = 'none';
|
||||
document.getElementById('sfMiniToolbar-{{ token }}').style.display = 'block';
|
||||
Sfjs.setPreference('toolbar/displayState', 'none');
|
||||
"></a>
|
||||
">
|
||||
{{ include('@WebProfiler/Icon/close.svg') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- END of Symfony Web Debug Toolbar -->
|
||||
|
@ -1,9 +1,6 @@
|
||||
{% if link %}
|
||||
{% set icon %}
|
||||
<a href="{{ path('_profiler', { 'token': token, 'panel': name }) }}">{{ icon }}</a>
|
||||
{% endset %}
|
||||
{% endif %}
|
||||
<div class="sf-toolbar-block">
|
||||
<div class="sf-toolbar-block sf-toolbar-block-{{ name }} sf-toolbar-status-{{ status|default('normal') }}">
|
||||
{% if link %}<a href="{{ path('_profiler', { token: token, panel: name }) }}">{% endif %}
|
||||
<div class="sf-toolbar-icon">{{ icon|default('') }}</div>
|
||||
{% if link %}</a>{% endif %}
|
||||
<div class="sf-toolbar-info">{{ text|default('') }}</div>
|
||||
</div>
|
||||
|
@ -46,12 +46,15 @@
|
||||
toolbarInfo.style.right = '';
|
||||
toolbarInfo.style.left = '';
|
||||
|
||||
if (leftValue > 0 && rightValue > 0) {
|
||||
if (elementWidth > pageWidth) {
|
||||
toolbarInfo.style.left = 0;
|
||||
}
|
||||
else if (leftValue > 0 && rightValue > 0) {
|
||||
toolbarInfo.style.right = (rightValue * -1) + 'px';
|
||||
} else if (leftValue < 0) {
|
||||
toolbarInfo.style.left = 0;
|
||||
} else {
|
||||
toolbarInfo.style.right = '-1px';
|
||||
toolbarInfo.style.right = '0px';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -30,6 +30,18 @@ class BooleanNodeDefinition extends ScalarNodeDefinition
|
||||
$this->nullEquivalent = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @deprecated Deprecated since version 2.8, to be removed in 3.0.
|
||||
*/
|
||||
public function cannotBeEmpty()
|
||||
{
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
return parent::cannotBeEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiate a Node.
|
||||
*
|
||||
|
@ -58,4 +58,16 @@ abstract class NumericNodeDefinition extends ScalarNodeDefinition
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @deprecated Deprecated since version 2.8, to be removed in 3.0.
|
||||
*/
|
||||
public function cannotBeEmpty()
|
||||
{
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
return parent::cannotBeEmpty();
|
||||
}
|
||||
}
|
||||
|
@ -215,8 +215,8 @@ class ArgvInput extends Input
|
||||
|
||||
$option = $this->definition->getOption($name);
|
||||
|
||||
// Convert false values (from a previous call to substr()) to null
|
||||
if (false === $value) {
|
||||
// Convert empty values to null
|
||||
if (!isset($value[0])) {
|
||||
$value = null;
|
||||
}
|
||||
|
||||
|
@ -379,7 +379,7 @@ class SymfonyStyle extends OutputStyle
|
||||
{
|
||||
$chars = substr(str_replace(PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2);
|
||||
|
||||
if (false === $chars) {
|
||||
if (!isset($chars[0])) {
|
||||
return $this->newLine(); //empty history, so we should start with a new line.
|
||||
}
|
||||
//Prepend new line for each non LF chars (This means no blank line was output before)
|
||||
|
@ -38,7 +38,7 @@ class ExceptionHandler
|
||||
|
||||
public function __construct($debug = true, $charset = null, $fileLinkFormat = null)
|
||||
{
|
||||
if (false !== strpos($charset, '%') xor false === strpos($fileLinkFormat, '%')) {
|
||||
if (false !== strpos($charset, '%')) {
|
||||
// Swap $charset and $fileLinkFormat for BC reasons
|
||||
$pivot = $fileLinkFormat;
|
||||
$fileLinkFormat = $charset;
|
||||
@ -170,19 +170,23 @@ class ExceptionHandler
|
||||
* it will fallback to plain PHP functions.
|
||||
*
|
||||
* @param \Exception $exception An \Exception instance
|
||||
*
|
||||
* @see sendPhpResponse()
|
||||
* @see createResponse()
|
||||
*/
|
||||
private function failSafeHandle(\Exception $exception)
|
||||
{
|
||||
if (class_exists('Symfony\Component\HttpFoundation\Response', false)) {
|
||||
if (class_exists('Symfony\Component\HttpFoundation\Response', false)
|
||||
&& __CLASS__ !== get_class($this)
|
||||
&& ($reflector = new \ReflectionMethod($this, 'createResponse'))
|
||||
&& __CLASS__ !== $reflector->class
|
||||
) {
|
||||
$response = $this->createResponse($exception);
|
||||
$response->sendHeaders();
|
||||
$response->sendContent();
|
||||
} else {
|
||||
$this->sendPhpResponse($exception);
|
||||
@trigger_error(sprintf("The %s::createResponse method is deprecated since 2.8 and won't be called anymore when handling an exception in 3.0.", $reflector->class), E_USER_DEPRECATED);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->sendPhpResponse($exception);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -216,9 +220,13 @@ class ExceptionHandler
|
||||
* @param \Exception|FlattenException $exception An \Exception instance
|
||||
*
|
||||
* @return Response A Response instance
|
||||
*
|
||||
* @deprecated since 2.8, to be removed in 3.0.
|
||||
*/
|
||||
public function createResponse($exception)
|
||||
{
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
if (!$exception instanceof FlattenException) {
|
||||
$exception = FlattenException::create($exception);
|
||||
}
|
||||
|
@ -13,71 +13,97 @@ namespace Symfony\Component\Debug\Tests;
|
||||
|
||||
use Symfony\Component\Debug\ExceptionHandler;
|
||||
use Symfony\Component\Debug\Exception\OutOfMemoryException;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||
|
||||
require_once __DIR__.'/HeaderMock.php';
|
||||
|
||||
class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
testHeader();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
testHeader();
|
||||
}
|
||||
|
||||
public function testDebug()
|
||||
{
|
||||
$handler = new ExceptionHandler(false);
|
||||
$response = $handler->createResponse(new \RuntimeException('Foo'));
|
||||
|
||||
$this->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response->getContent());
|
||||
$this->assertNotContains('<h2 class="block_exception clear_fix">', $response->getContent());
|
||||
ob_start();
|
||||
$handler->sendPhpResponse(new \RuntimeException('Foo'));
|
||||
$response = ob_get_clean();
|
||||
|
||||
$this->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response);
|
||||
$this->assertNotContains('<h2 class="block_exception clear_fix">', $response);
|
||||
|
||||
$handler = new ExceptionHandler(true);
|
||||
$response = $handler->createResponse(new \RuntimeException('Foo'));
|
||||
|
||||
$this->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response->getContent());
|
||||
$this->assertContains('<h2 class="block_exception clear_fix">', $response->getContent());
|
||||
ob_start();
|
||||
$handler->sendPhpResponse(new \RuntimeException('Foo'));
|
||||
$response = ob_get_clean();
|
||||
|
||||
$this->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response);
|
||||
$this->assertContains('<h2 class="block_exception clear_fix">', $response);
|
||||
}
|
||||
|
||||
public function testStatusCode()
|
||||
{
|
||||
$handler = new ExceptionHandler(false);
|
||||
$handler = new ExceptionHandler(false, 'iso8859-1');
|
||||
|
||||
$response = $handler->createResponse(new \RuntimeException('Foo'));
|
||||
$this->assertEquals('500', $response->getStatusCode());
|
||||
$this->assertContains('Whoops, looks like something went wrong.', $response->getContent());
|
||||
ob_start();
|
||||
$handler->sendPhpResponse(new NotFoundHttpException('Foo'));
|
||||
$response = ob_get_clean();
|
||||
|
||||
$response = $handler->createResponse(new NotFoundHttpException('Foo'));
|
||||
$this->assertEquals('404', $response->getStatusCode());
|
||||
$this->assertContains('Sorry, the page you are looking for could not be found.', $response->getContent());
|
||||
$this->assertContains('Sorry, the page you are looking for could not be found.', $response);
|
||||
|
||||
$expectedHeaders = array(
|
||||
array('HTTP/1.0 404', true, null),
|
||||
array('Content-Type: text/html; charset=iso8859-1', true, null),
|
||||
);
|
||||
|
||||
$this->assertSame($expectedHeaders, testHeader());
|
||||
}
|
||||
|
||||
public function testHeaders()
|
||||
{
|
||||
$handler = new ExceptionHandler(false);
|
||||
$handler = new ExceptionHandler(false, 'iso8859-1');
|
||||
|
||||
$response = $handler->createResponse(new MethodNotAllowedHttpException(array('POST')));
|
||||
$this->assertEquals('405', $response->getStatusCode());
|
||||
$this->assertEquals('POST', $response->headers->get('Allow'));
|
||||
ob_start();
|
||||
$handler->sendPhpResponse(new MethodNotAllowedHttpException(array('POST')));
|
||||
$response = ob_get_clean();
|
||||
|
||||
$expectedHeaders = array(
|
||||
array('HTTP/1.0 405', true, null),
|
||||
array('Allow: POST', false, null),
|
||||
array('Content-Type: text/html; charset=iso8859-1', true, null),
|
||||
);
|
||||
|
||||
$this->assertSame($expectedHeaders, testHeader());
|
||||
}
|
||||
|
||||
public function testNestedExceptions()
|
||||
{
|
||||
$handler = new ExceptionHandler(true);
|
||||
$response = $handler->createResponse(new \RuntimeException('Foo', 0, new \RuntimeException('Bar')));
|
||||
ob_start();
|
||||
$handler->sendPhpResponse(new \RuntimeException('Foo', 0, new \RuntimeException('Bar')));
|
||||
$response = ob_get_clean();
|
||||
|
||||
$this->assertStringMatchesFormat('%A<span class="exception_message">Foo</span>%A<span class="exception_message">Bar</span>%A', $response);
|
||||
}
|
||||
|
||||
public function testHandle()
|
||||
{
|
||||
$exception = new \Exception('foo');
|
||||
|
||||
if (class_exists('Symfony\Component\HttpFoundation\Response')) {
|
||||
$handler = $this->getMock('Symfony\Component\Debug\ExceptionHandler', array('createResponse'));
|
||||
$handler
|
||||
->expects($this->exactly(2))
|
||||
->method('createResponse')
|
||||
->will($this->returnValue(new Response()));
|
||||
} else {
|
||||
$handler = $this->getMock('Symfony\Component\Debug\ExceptionHandler', array('sendPhpResponse'));
|
||||
$handler
|
||||
->expects($this->exactly(2))
|
||||
->method('sendPhpResponse');
|
||||
}
|
||||
|
||||
$handler->handle($exception);
|
||||
|
||||
@ -92,18 +118,10 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$exception = new OutOfMemoryException('foo', 0, E_ERROR, __FILE__, __LINE__);
|
||||
|
||||
if (class_exists('Symfony\Component\HttpFoundation\Response')) {
|
||||
$handler = $this->getMock('Symfony\Component\Debug\ExceptionHandler', array('createResponse'));
|
||||
$handler
|
||||
->expects($this->once())
|
||||
->method('createResponse')
|
||||
->will($this->returnValue(new Response()));
|
||||
} else {
|
||||
$handler = $this->getMock('Symfony\Component\Debug\ExceptionHandler', array('sendPhpResponse'));
|
||||
$handler
|
||||
->expects($this->once())
|
||||
->method('sendPhpResponse');
|
||||
}
|
||||
|
||||
$handler->setHandler(function ($e) {
|
||||
$this->fail('OutOfMemoryException should bypass the handler');
|
||||
|
38
src/Symfony/Component/Debug/Tests/HeaderMock.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Debug;
|
||||
|
||||
function headers_sent()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
function header($str, $replace = true, $status = null)
|
||||
{
|
||||
Tests\testHeader($str, $replace, $status);
|
||||
}
|
||||
|
||||
namespace Symfony\Component\Debug\Tests;
|
||||
|
||||
function testHeader()
|
||||
{
|
||||
static $headers = array();
|
||||
|
||||
if (!$h = func_get_args()) {
|
||||
$h = $headers;
|
||||
$headers = array();
|
||||
|
||||
return $h;
|
||||
}
|
||||
|
||||
$headers[] = func_get_args();
|
||||
}
|
@ -25,12 +25,7 @@
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.8|~3.0",
|
||||
"symfony/class-loader": "~2.8|~3.0",
|
||||
"symfony/http-kernel": "~2.8|~3.0",
|
||||
"symfony/http-foundation": "~2.8|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/http-foundation": "",
|
||||
"symfony/http-kernel": ""
|
||||
"symfony/http-kernel": "~2.8|~3.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Component\\Debug\\": "" }
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\ParameterBag;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
|
||||
|
||||
/**
|
||||
@ -25,6 +26,8 @@ interface ParameterBagInterface
|
||||
/**
|
||||
* Clears all parameters.
|
||||
*
|
||||
* @throws LogicException if the ParameterBagInterface can not be cleared
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clear();
|
||||
@ -34,6 +37,8 @@ interface ParameterBagInterface
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @throws LogicException if the parameter can not be added
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $parameters);
|
||||
@ -73,6 +78,8 @@ interface ParameterBagInterface
|
||||
* @param string $name The parameter name
|
||||
* @param mixed $value The parameter value
|
||||
*
|
||||
* @throws LogicException if the parameter can not be set
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($name, $value);
|
||||
|
@ -57,4 +57,13 @@ class FrozenParameterBagTest extends \PHPUnit_Framework_TestCase
|
||||
$bag = new FrozenParameterBag(array());
|
||||
$bag->add(array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \LogicException
|
||||
*/
|
||||
public function testRemove()
|
||||
{
|
||||
$bag = new FrozenParameterBag(array('foo' => 'bar'));
|
||||
$bag->remove('foo');
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ class RouterListener implements EventSubscriberInterface
|
||||
}
|
||||
|
||||
if (null !== $this->logger) {
|
||||
$this->logger->info(sprintf('Matched route "%s".', $parameters['_route']), array(
|
||||
$this->logger->info(sprintf('Matched route "%s".', isset($parameters['_route']) ? $parameters['_route'] : 'n/a'), array(
|
||||
'route_parameters' => $parameters,
|
||||
'request_uri' => $request->getUri(),
|
||||
));
|
||||
|
@ -161,7 +161,11 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
||||
*/
|
||||
public function getSurrogate()
|
||||
{
|
||||
return $this->getEsi();
|
||||
if (!$this->surrogate instanceof Esi) {
|
||||
throw new \LogicException('This instance of HttpCache was not set up to use ESI as surrogate handler. You must overwrite and use createSurrogate');
|
||||
}
|
||||
|
||||
return $this->surrogate;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -128,4 +128,34 @@ class RouterListenerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals('GET', $context->getMethod());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider getLoggingParameterData
|
||||
*/
|
||||
public function testLoggingParameter($parameter, $log)
|
||||
{
|
||||
$requestMatcher = $this->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface');
|
||||
$requestMatcher->expects($this->once())
|
||||
->method('matchRequest')
|
||||
->will($this->returnValue($parameter));
|
||||
|
||||
$logger = $this->getMock('Psr\Log\LoggerInterface');
|
||||
$logger->expects($this->once())
|
||||
->method('info')
|
||||
->with($this->equalTo($log));
|
||||
|
||||
$kernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface');
|
||||
$request = Request::create('http://localhost/');
|
||||
|
||||
$listener = new RouterListener($requestMatcher, new RequestContext(), $logger, $this->requestStack);
|
||||
$listener->onKernelRequest(new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST));
|
||||
}
|
||||
|
||||
public function getLoggingParameterData()
|
||||
{
|
||||
return array(
|
||||
array(array('_route' => 'foo'), 'Matched route "foo".'),
|
||||
array(array(), 'Matched route "n/a".'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
|
||||
try {
|
||||
return $this->getNames($displayLocale);
|
||||
} catch (MissingResourceException $e) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
|
||||
try {
|
||||
return $this->localeProvider->getLocales();
|
||||
} catch (MissingResourceException $e) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
|
||||
try {
|
||||
return $this->getNames($displayLocale);
|
||||
} catch (MissingResourceException $e) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
|
||||
try {
|
||||
return $this->scriptProvider->getNames($displayLocale);
|
||||
} catch (MissingResourceException $e) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
|
||||
try {
|
||||
return $this->localeProvider->getLocales();
|
||||
} catch (MissingResourceException $e) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface
|
||||
try {
|
||||
return parent::getLocales();
|
||||
} catch (MissingResourceException $e) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface
|
||||
try {
|
||||
return $this->getNames($displayLocale);
|
||||
} catch (MissingResourceException $e) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class RegionBundle extends RegionDataProvider implements RegionBundleInterface
|
||||
try {
|
||||
return $this->getNames($displayLocale);
|
||||
} catch (MissingResourceException $e) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ class RegionBundle extends RegionDataProvider implements RegionBundleInterface
|
||||
try {
|
||||
return $this->localeProvider->getLocales();
|
||||
} catch (MissingResourceException $e) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,6 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
|
||||
{
|
||||
$grant = 0;
|
||||
$deny = 0;
|
||||
$abstain = 0;
|
||||
foreach ($this->voters as $voter) {
|
||||
$result = $voter->vote($token, $object, $attributes);
|
||||
|
||||
@ -163,11 +162,6 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
|
||||
case VoterInterface::ACCESS_DENIED:
|
||||
++$deny;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
++$abstain;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -180,7 +174,7 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($grant == $deny && $grant != 0) {
|
||||
if ($grant > 0) {
|
||||
return $this->allowIfEqualGrantedDeniedDecisions;
|
||||
}
|
||||
|
||||
|
@ -47,8 +47,9 @@ class ExceptionListener
|
||||
private $errorPage;
|
||||
private $logger;
|
||||
private $httpUtils;
|
||||
private $stateless;
|
||||
|
||||
public function __construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null)
|
||||
public function __construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null, $stateless = false)
|
||||
{
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
$this->accessDeniedHandler = $accessDeniedHandler;
|
||||
@ -58,6 +59,7 @@ class ExceptionListener
|
||||
$this->authenticationTrustResolver = $trustResolver;
|
||||
$this->errorPage = $errorPage;
|
||||
$this->logger = $logger;
|
||||
$this->stateless = $stateless;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -185,7 +187,9 @@ class ExceptionListener
|
||||
$this->logger->debug('Calling Authentication entry point.');
|
||||
}
|
||||
|
||||
if (!$this->stateless) {
|
||||
$this->setTargetPath($request);
|
||||
}
|
||||
|
||||
if ($authException instanceof AccountStatusException) {
|
||||
// remove the security token to prevent infinite redirect loops
|
||||
|
@ -175,7 +175,7 @@
|
||||
<target>画像の高さが小さすぎます({{ height }}ピクセル)。{{ min_height }}ピクセル以上にしてください。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="47">
|
||||
<source>This value should be the user current password.</source>
|
||||
<source>This value should be the user's current password.</source>
|
||||
<target>ユーザーの現在のパスワードでなければなりません。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="48">
|
||||
|
@ -175,7 +175,7 @@
|
||||
<target>ความสูงของภาพไม่ได้ขนาด ({{ height }}px) อนุญาตให้สูงอย่างน้อยที่สุด {{ min_height }}px</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="47">
|
||||
<source>This value should be the user current password.</source>
|
||||
<source>This value should be the user's current password.</source>
|
||||
<target>ค่านี้ควรจะเป็นรหัสผ่านปัจจุบันของผู้ใช้</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="48">
|
||||
|
@ -32,7 +32,7 @@ ReflectionClass {
|
||||
constants: array:3 [
|
||||
"IS_IMPLICIT_ABSTRACT" => 16
|
||||
"IS_EXPLICIT_ABSTRACT" => 32
|
||||
"IS_FINAL" => 64
|
||||
"IS_FINAL" => %d
|
||||
]
|
||||
properties: array:%d [
|
||||
"name" => ReflectionProperty {
|
||||
|
@ -356,7 +356,7 @@ class Parser
|
||||
return;
|
||||
}
|
||||
|
||||
if ($inSequence && $oldLineIndentation === $newIndent && '-' === $data[0][0]) {
|
||||
if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) {
|
||||
// the previous line contained a dash but no item content, this line is a sequence item with the same indentation
|
||||
// and therefore no nested list or mapping
|
||||
$this->moveToPreviousLine();
|
||||
|