Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitba24a51

Browse files
committed
Rename the new exception controller and mark it as internal
1 parentf6e93de commitba24a51

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

‎src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CHANGELOG
77
* Added button to clear the ajax request tab
88
* Deprecated the`ExceptionController::templateExists()` method
99
* Deprecated the`TemplateManager::templateExists()` method
10-
* Deprecated the`ExceptionController` in favor of`ExceptionErrorController`
10+
* Deprecated the`ExceptionController` in favor of`ExceptionPanelController`
1111
* Marked all classes of the WebProfilerBundle as internal
1212

1313
4.3.0

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@
2020
useTwig\Error\LoaderError;
2121
useTwig\Loader\ExistsLoaderInterface;
2222

23-
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "%s" instead.', ExceptionController::class,ExceptionErrorController::class),E_USER_DEPRECATED);
23+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "%s" instead.', ExceptionController::class,ExceptionPanelController::class),E_USER_DEPRECATED);
2424

2525
/**
2626
* ExceptionController.
2727
*
2828
* @author Fabien Potencier <fabien@symfony.com>
2929
*
30-
* @deprecated since Symfony 4.4, use the ExceptionErrorController instead.
31-
* @internal since Symfony 4.4
30+
* @deprecated since Symfony 4.4, use the ExceptionPanelController instead.
3231
*/
3332
class ExceptionController
3433
{
@@ -106,7 +105,7 @@ public function cssAction($token)
106105

107106
$template =$this->getTemplate();
108107

109-
if (!$this->templateExists($template,false)) {
108+
if (!$this->templateExists($template)) {
110109
returnnewResponse($this->errorRenderer->getStylesheet(),200, ['Content-Type' =>'text/css']);
111110
}
112111

@@ -118,15 +117,8 @@ protected function getTemplate()
118117
return'@Twig/Exception/'.($this->debug ?'exception' :'error').'.html.twig';
119118
}
120119

121-
/**
122-
* @deprecated since Symfony 4.4
123-
*/
124-
protectedfunctiontemplateExists($template/*, bool $triggerDeprecation = true */)
120+
protectedfunctiontemplateExists($template)
125121
{
126-
if (1 ===\func_num_args()) {
127-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.4, use the "exists()" method of the Twig loader instead.',__METHOD__),E_USER_DEPRECATED);
128-
}
129-
130122
$loader =$this->twig->getLoader();
131123
if ($loaderinstanceof ExistsLoaderInterface) {
132124
return$loader->exists($template);

‎src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionErrorController.php‎renamed to ‎src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionPanelController.php‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
* Renders the exception panel.
2121
*
2222
* @author Yonel Ceruto <yonelceruto@gmail.com>
23+
*
24+
* @internal
2325
*/
24-
classExceptionErrorController
26+
classExceptionPanelController
2527
{
2628
private$htmlErrorRenderer;
2729
private$profiler;
@@ -46,14 +48,14 @@ public function body(string $token): Response
4648
->getException()
4749
;
4850

49-
returnnewResponse($this->htmlErrorRenderer->getBody($exception));
51+
returnnewResponse($this->htmlErrorRenderer->getBody($exception),200, ['Content-Type' =>'text/html']);
5052
}
5153

5254
/**
5355
* Renders the exception panel stylesheet.
5456
*/
5557
publicfunctionstylesheet():Response
5658
{
57-
returnnewResponse($this->htmlErrorRenderer->getStylesheet());
59+
returnnewResponse($this->htmlErrorRenderer->getStylesheet(),200, ['Content-Type' =>'text/css']);
5860
}
5961
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
<argument>%kernel.debug%</argument>
2929
<argumenttype="service"id="debug.file_link_formatter" />
3030
<argumenttype="service"id="error_renderer.renderer.html" />
31-
<deprecated>The "%service_id%" service is deprecated since Symfony 4.4, use the "web_profiler.controller.exception_error" service instead.</deprecated>
31+
<deprecated>The "%service_id%" service is deprecated since Symfony 4.4, use the "web_profiler.controller.exception_panel" service instead.</deprecated>
3232
</service>
3333

34-
<serviceid="web_profiler.controller.exception_error"class="Symfony\Bundle\WebProfilerBundle\Controller\ExceptionErrorController"public="true">
34+
<serviceid="web_profiler.controller.exception_panel"class="Symfony\Bundle\WebProfilerBundle\Controller\ExceptionPanelController"public="true">
3535
<argumenttype="service"id="error_renderer.renderer.html" />
3636
<argumenttype="service"id="profiler"on-invalid="null" />
3737
</service>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
</route>
3838

3939
<routeid="_profiler_exception"path="/{token}/exception">
40-
<defaultkey="_controller">web_profiler.controller.exception_error::body</default>
40+
<defaultkey="_controller">web_profiler.controller.exception_panel::body</default>
4141
</route>
4242

4343
<routeid="_profiler_exception_css"path="/{token}/exception.css">
44-
<defaultkey="_controller">web_profiler.controller.exception_error::stylesheet</default>
44+
<defaultkey="_controller">web_profiler.controller.exception_panel::stylesheet</default>
4545
</route>
4646

4747
</routes>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp