mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-16 01:26:27 +03:00
Verify that Kernel is terminatable.
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App;
|
||||
use PHPFastCGI\FastCGIDaemon\Http\RequestInterface;
|
||||
use PHPFastCGI\FastCGIDaemon\KernelInterface;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpKernel\TerminableInterface;
|
||||
|
||||
class FastCGIKernel implements KernelInterface
|
||||
{
|
||||
@@ -18,9 +19,11 @@ class FastCGIKernel implements KernelInterface
|
||||
public function handleRequest(RequestInterface $request)
|
||||
{
|
||||
$symfonyRequest = $request->getHttpFoundationRequest();
|
||||
|
||||
$symfonyResponse = $this->kernel->handle($symfonyRequest);
|
||||
$this->kernel->terminate($symfonyRequest, $symfonyResponse);
|
||||
|
||||
if ($this->kernel instanceof TerminableInterface) {
|
||||
$this->kernel->terminate($symfonyRequest, $symfonyResponse);
|
||||
}
|
||||
|
||||
return $symfonyResponse;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user