Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2cfc573

Browse filesBrowse files
[WebProfilerBundle] use the router to resolve file links
1 parent 7af20bc commit 2cfc573
Copy full SHA for 2cfc573

File tree

Expand file treeCollapse file tree

2 files changed

+20
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+20
-3
lines changed

‎src/Symfony/Bundle/WebProfilerBundle/Resources/config/profiler.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/config/profiler.xml
+14-1Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,20 @@
5656
<argument>%debug.file_link_format%</argument>
5757
<argument type="service" id="request_stack" on-invalid="ignore" />
5858
<argument>%kernel.project_dir%</argument>
59-
<argument>/_profiler/open?file=%%f&amp;line=%%l#line%%l</argument>
59+
<argument type="service">
60+
<service class="string">
61+
<factory function="implode" />
62+
<argument type="collection">
63+
<argument type="service">
64+
<service class="string">
65+
<factory service="router" method="generate" />
66+
<argument>_profiler_open_file</argument>
67+
</service>
68+
</argument>
69+
<argument>?file=%%f&amp;line=%%l#line%%l</argument>
70+
</argument>
71+
</service>
72+
</argument>
6073
</service>
6174
</services>
6275
</container>

‎src/Symfony/Component/Routing/Router.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Router.php
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,9 @@ function (ConfigCacheInterface $cache) {
302302
}
303303
);
304304

305-
require_once $cache->getPath();
305+
if (!class_exists($this->options['matcher_cache_class'], false)) {
306+
require_once $cache->getPath();
307+
}
306308

307309
return $this->matcher = new $this->options['matcher_cache_class']($this->context);
308310
}
@@ -334,7 +336,9 @@ function (ConfigCacheInterface $cache) {
334336
}
335337
);
336338

337-
require_once $cache->getPath();
339+
if (!class_exists($this->options['generator_cache_class'], false)) {
340+
require_once $cache->getPath();
341+
}
338342

339343
$this->generator = new $this->options['generator_cache_class']($this->context, $this->logger);
340344
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.