mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 13:09:53 +09:00
upgrade to laravel 8.0
This commit is contained in:
committed by
Attila Jozsef Kerekes
parent
43f894b58d
commit
27f58c0866
18
vendor/symfony/http-kernel/HttpKernel.php
vendored
18
vendor/symfony/http-kernel/HttpKernel.php
vendored
@@ -70,6 +70,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface
|
||||
{
|
||||
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
|
||||
|
||||
$this->requestStack->push($request);
|
||||
try {
|
||||
return $this->handleRaw($request, $type);
|
||||
} catch (\Exception $e) {
|
||||
@@ -83,6 +84,8 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface
|
||||
}
|
||||
|
||||
return $this->handleThrowable($e, $request, $type);
|
||||
} finally {
|
||||
$this->requestStack->pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +106,17 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface
|
||||
throw $exception;
|
||||
}
|
||||
|
||||
$response = $this->handleThrowable($exception, $request, self::MAIN_REQUEST);
|
||||
if ($pop = $request !== $this->requestStack->getMainRequest()) {
|
||||
$this->requestStack->push($request);
|
||||
}
|
||||
|
||||
try {
|
||||
$response = $this->handleThrowable($exception, $request, self::MAIN_REQUEST);
|
||||
} finally {
|
||||
if ($pop) {
|
||||
$this->requestStack->pop();
|
||||
}
|
||||
}
|
||||
|
||||
$response->sendHeaders();
|
||||
$response->sendContent();
|
||||
@@ -121,8 +134,6 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface
|
||||
*/
|
||||
private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response
|
||||
{
|
||||
$this->requestStack->push($request);
|
||||
|
||||
// request
|
||||
$event = new RequestEvent($this, $request, $type);
|
||||
$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
|
||||
@@ -199,7 +210,6 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface
|
||||
private function finishRequest(Request $request, int $type)
|
||||
{
|
||||
$this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST);
|
||||
$this->requestStack->pop();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user