Skip to content

Commit 10e5705

Browse files
[FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links
1 parent ddbcc4d commit 10e5705

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

Resources/config/profiler.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@
3434

3535
<service id="twig.extension.webprofiler" class="Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension" public="false">
3636
<tag name="twig.extension" />
37+
<argument type="service">
38+
<service class="Symfony\Component\VarDumper\Dumper\HtmlDumper">
39+
<argument>null</argument>
40+
<argument>%kernel.charset%</argument>
41+
<argument type="constant">Symfony\Component\VarDumper\Dumper\HtmlDumper::DUMP_LIGHT_ARRAY</argument>
42+
<call method="setDisplayOptions">
43+
<argument type="collection">
44+
<argument key="fileLinkFormat">%debug.file_link_format%</argument>
45+
</argument>
46+
</call>
47+
</service>
48+
</argument>
3749
</service>
3850
</services>
3951
</container>

Tests/DependencyInjection/WebProfilerExtensionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ protected function setUp()
5656
$this->container->setParameter('kernel.cache_dir', __DIR__);
5757
$this->container->setParameter('kernel.debug', false);
5858
$this->container->setParameter('kernel.root_dir', __DIR__);
59+
$this->container->setParameter('kernel.charset', 'UTF-8');
60+
$this->container->setParameter('debug.file_link_format', null);
5961
$this->container->setParameter('profiler.class', array('Symfony\\Component\\HttpKernel\\Profiler\\Profiler'));
6062
$this->container->register('profiler', $this->getMockClass('Symfony\\Component\\HttpKernel\\Profiler\\Profiler'))
6163
->addArgument(new Definition($this->getMockClass('Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface')));

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"symfony/http-kernel": "~3.1",
2121
"symfony/polyfill-php70": "~1.0",
2222
"symfony/routing": "~2.8|~3.0",
23-
"symfony/twig-bridge": "~2.8|~3.0"
23+
"symfony/twig-bridge": "~2.8|~3.0",
24+
"symfony/var-dumper": "~3.2"
2425
},
2526
"require-dev": {
2627
"symfony/config": "~2.8|~3.0",

0 commit comments

Comments
 (0)