Skip to content

Commit d3054d6

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [WebProfilerBundle] add missing tests FormInterface::getPropertyPath(): PropertyPathInterface|null [FrameworkBundle][Routing] Remove unused logger argument
2 parents 4400921 + efb4891 commit d3054d6

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
</service>
6262

6363
<service id="router.default" class="%router.class%" public="false">
64-
<tag name="monolog.logger" channel="router" />
6564
<argument type="service" id="service_container" />
6665
<argument>%router.resource%</argument>
6766
<argument type="collection">
@@ -77,7 +76,6 @@
7776
<argument key="matcher_cache_class">%router.options.matcher.cache_class%</argument>
7877
</argument>
7978
<argument type="service" id="router.request_context" on-invalid="ignore" />
80-
<argument type="service" id="logger" on-invalid="ignore" />
8179
<call method="setConfigCacheFactory">
8280
<argument type="service" id="config_cache_factory" />
8381
</call>

src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,29 @@ public function testToolbarIsInjected()
8383
$this->assertEquals("<html><head></head><body>\nWDT\n</body></html>", $response->getContent());
8484
}
8585

86+
/**
87+
* @depends testToolbarIsInjected
88+
*/
89+
public function testToolbarIsNotInjectedOnNonHtmlContentType()
90+
{
91+
$response = new Response('<html><head></head><body></body></html>');
92+
$response->headers->set('X-Debug-Token', 'xxxxxxxx');
93+
$response->headers->set('Content-Type', 'text/xml');
94+
$event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(), HttpKernelInterface::MASTER_REQUEST, $response);
95+
96+
$listener = new WebDebugToolbarListener($this->getTwigMock());
97+
$listener->onKernelResponse($event);
98+
99+
$this->assertEquals('<html><head></head><body></body></html>', $response->getContent());
100+
}
101+
86102
/**
87103
* @depends testToolbarIsInjected
88104
*/
89105
public function testToolbarIsNotInjectedOnContentDispositionAttachment()
90106
{
91107
$response = new Response('<html><head></head><body></body></html>');
108+
$response->headers->set('X-Debug-Token', 'xxxxxxxx');
92109
$response->headers->set('Content-Disposition', 'attachment; filename=test.html');
93110
$event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(false, 'html'), HttpKernelInterface::MASTER_REQUEST, $response);
94111

src/Symfony/Component/Form/FormInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function getName();
171171
/**
172172
* Returns the property path that the form is mapped to.
173173
*
174-
* @return \Symfony\Component\PropertyAccess\PropertyPathInterface The property path
174+
* @return \Symfony\Component\PropertyAccess\PropertyPathInterface|null The property path
175175
*/
176176
public function getPropertyPath();
177177

0 commit comments

Comments
 (0)