minor #23453 [WebProfilerBundle] Cleanup profiler leftover (ro0NL)

This PR was merged into the 3.2 branch.

Discussion
----------

[WebProfilerBundle] Cleanup profiler leftover

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Leftover from 2.8

Commits
-------

8a19795 [WebProfilerBundle] Cleanup profiler leftover
This commit is contained in:
Nicolas Grekas 2017-07-11 08:59:50 +02:00
commit 0e988ca9be
3 changed files with 0 additions and 47 deletions

View File

@ -128,34 +128,6 @@ class ProfilerController
)), 200, array('Content-Type' => 'text/html'));
}
/**
* Displays information page.
*
* @param Request $request The current HTTP Request
* @param string $about The about message
*
* @return Response A Response instance
*
* @throws NotFoundHttpException
*/
public function infoAction(Request $request, $about)
{
if (null === $this->profiler) {
throw new NotFoundHttpException('The profiler must be enabled.');
}
$this->profiler->disable();
if (null !== $this->cspHandler) {
$this->cspHandler->disableCsp();
}
return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array(
'about' => $about,
'request' => $request,
)), 200, array('Content-Type' => 'text/html'));
}
/**
* Renders the Web Debug Toolbar.
*

View File

@ -16,10 +16,6 @@
<default key="_controller">web_profiler.controller.profiler:searchBarAction</default>
</route>
<route id="_profiler_info" path="/info/{about}">
<default key="_controller">web_profiler.controller.profiler:infoAction</default>
</route>
<route id="_profiler_phpinfo" path="/phpinfo">
<default key="_controller">web_profiler.controller.profiler:phpinfoAction</default>
</route>

View File

@ -1,25 +1,10 @@
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
{% set messages = {
'purge' : {
status: 'success',
title: 'The profiler database was purged successfully',
message: 'Now you need to browse some pages with the Symfony Profiler enabled to collect data.'
},
'no_token' : {
status: 'error',
title: (token|default('') == 'latest') ? 'There are no profiles' : 'Token not found',
message: (token|default('') == 'latest') ? 'No profiles found in the database.' : 'Token "' ~ token|default('') ~ '" was not found in the database.'
},
'upload_error' : {
status: 'error',
title: 'A problem occurred when uploading the data',
message: 'No file given or the file was not uploaded successfully.'
},
'already_exists' : {
status: 'error',
title: 'A problem occurred when uploading the data',
message: 'The token already exists in the database.'
}
} %}