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

Commite363f16

Browse files
committed
bug#59229 [WebProfilerBundle] fix loading of toolbar stylesheet (alexislefebvre)
This PR was merged into the 7.2 branch.Discussion----------[WebProfilerBundle] fix loading of toolbar stylesheet| Q | A| ------------- | ---| Branch? | 7.2| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues |Fix#59045| License | MITIt looks like this PR-#58287Caused issues with some configurations:-#59045According to the thumb-up emoji on [this comment](#59045 (comment)) (I don’t have a better measurement of the impact), it affected at least 10 users, with various web servers.Proposals:1. do not use the `.css` file extension so that servers do not try to serve an actual file2. if we consider that the disappearance of the style of the profiler’s toolbar is a breaking change, the `.css` file extension could be added back with Symfony 8.0, with a note to help people upgrade (see the workarounds in the issue)Commits-------7fef930 fix: loading of WebProfilerBundle’s toolbar stylesheet
2 parentsb048d76 +7fef930 commite363f16

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
66

7-
<routeid="_wdt_stylesheet"path="/styles.css">
7+
<routeid="_wdt_stylesheet"path="/styles">
88
<defaultkey="_controller">web_profiler.controller.profiler::toolbarStylesheetAction</default>
99
</route>
1010

‎src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ public function testToolbarStylesheetActionWithProfilerDisabled()
152152

153153
publicfunctiontestToolbarStylesheetAction()
154154
{
155-
$urlGenerator =$this->createMock(UrlGeneratorInterface::class);
156-
$twig =$this->createMock(Environment::class);
157-
$profiler =$this->createMock(Profiler::class);
155+
$kernel =newWebProfilerBundleKernel();
156+
$client =newKernelBrowser($kernel);
158157

159-
$controller =newProfilerController($urlGenerator,$profiler,$twig, []);
158+
$client->request('GET','/_wdt/styles');
159+
160+
$response =$client->getResponse();
160161

161-
$response =$controller->toolbarStylesheetAction();
162162
$this->assertSame(200,$response->getStatusCode());
163-
$this->assertSame('text/css',$response->headers->get('Content-Type'));
163+
$this->assertSame('text/css; charset=UTF-8',$response->headers->get('Content-Type'));
164164
$this->assertSame('max-age=600, private',$response->headers->get('Cache-Control'));
165165
}
166166

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp