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 a9f60f7

Browse filesBrowse files
committed
[WebProfilerBundle] removed dependency on FrameworkBundle (closes symfony#6949)
1 parent 3d564ee commit a9f60f7
Copy full SHA for a9f60f7

File tree

Expand file treeCollapse file tree

2 files changed

+16
-10
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-10
lines changed

‎src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ public function __construct(UrlGeneratorInterface $generator, Profiler $profiler
5252
$this->toolbarPosition = $toolbarPosition;
5353
}
5454

55+
/**
56+
* Redirects to the last profiles.
57+
*
58+
* @return RedirectResponse A RedirectResponse instance
59+
*/
60+
public function homeAction()
61+
{
62+
$this->profiler->disable();
63+
64+
return new RedirectResponse($this->generator->generate('_profiler_search_results', array('token' => 'empty', 'limit' => 10)));
65+
}
66+
5567
/**
5668
* Renders a profiler panel for the given token.
5769
*

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml
+4-10Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
66

7+
<route id="_profiler_home" pattern="/">
8+
<default key="_controller">web_profiler.controller.profiler:homeAction</default>
9+
</route>
10+
711
<route id="_profiler_search" pattern="/search">
812
<default key="_controller">web_profiler.controller.profiler:searchAction</default>
913
</route>
@@ -52,14 +56,4 @@
5256
<default key="_controller">web_profiler.controller.exception:cssAction</default>
5357
</route>
5458

55-
<route id="_profiler_redirect" pattern="/">
56-
<default key="_controller">FrameworkBundle:Redirect:redirect</default>
57-
<default key="route">_profiler_search_results</default>
58-
<default key="token">empty</default>
59-
<default key="ip"></default>
60-
<default key="url"></default>
61-
<default key="method"></default>
62-
<default key="limit">10</default>
63-
</route>
64-
6559
</routes>

0 commit comments

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