Skip to content

Navigation Menu

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 aa9b86e

Browse filesBrowse files
committed
[HttpKernel] added the terminate() call to the Client
1 parent 2750adb commit aa9b86e
Copy full SHA for aa9b86e

File tree

1 file changed

+8
-1
lines changed
Filter options

1 file changed

+8
-1
lines changed

‎src/Symfony/Component/HttpKernel/Client.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Client.php
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\BrowserKit\Cookie as DomCookie;
2020
use Symfony\Component\BrowserKit\History;
2121
use Symfony\Component\BrowserKit\CookieJar;
22+
use Symfony\Component\HttpKernel\TerminableInterface;
2223

2324
/**
2425
* Client simulates a browser and makes requests to a Kernel object.
@@ -57,7 +58,13 @@ public function __construct(HttpKernelInterface $kernel, array $server = array()
5758
*/
5859
protected function doRequest($request)
5960
{
60-
return $this->kernel->handle($request);
61+
$response = $this->kernel->handle($request);
62+
63+
if ($this->kernel instanceof TerminableInterface) {
64+
$this->kernel->terminate($request, $response);
65+
}
66+
67+
return $response;
6168
}
6269

6370
/**

0 commit comments

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