Unverified Commit e147702d authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3232082 by daffie, longwave, catch: [Symfony 6] Add "Response" type...

Issue #3232082 by daffie, longwave, catch: [Symfony 6] Add "Response" type hint to methods that implement the method Symfony\Component\HttpKernel\HttpKernelInterface::handle()
parent 4d2631df
Loading
Loading
Loading
Loading
+1 −1
Changes for core/lib/Drupal/Core/DrupalKernel.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -690,7 +690,7 @@ public function terminate(Request $request, Response $response) {
  /**
   * {@inheritdoc}
   */
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE): Response {
    // Ensure sane PHP environment variables.
    static::bootEnvironment();

+2 −1
Changes for core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@

use Drupal\Core\DrupalKernelInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;

/**
@@ -41,7 +42,7 @@ public function __construct(HttpKernelInterface $http_kernel, DrupalKernelInterf
  /**
   * {@inheritdoc}
   */
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE): Response {
    $this->drupalKernel->preHandle($request);

    return $this->httpKernel->handle($request, $type, $catch);
+2 −1
Changes for core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
namespace Drupal\Core\StackMiddleware;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;

/**
@@ -37,7 +38,7 @@ public function __construct(HttpKernelInterface $app) {
  /**
   * {@inheritdoc}
   */
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE): Response {
    // Register available mime types.
    foreach ($this->formats as $format => $mime_type) {
      $request->setFormat($format, $mime_type);
+2 −1
Changes for core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@

use Drupal\Core\Site\Settings;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;

/**
@@ -41,7 +42,7 @@ public function __construct(HttpKernelInterface $http_kernel, Settings $settings
  /**
   * {@inheritdoc}
   */
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE): Response {
    // Initialize proxy settings.
    static::setSettingsOnRequest($request, $this->settings);
    return $this->httpKernel->handle($request, $type, $catch);
+2 −1
Changes for core/lib/Drupal/Core/StackMiddleware/Session.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@

use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;

/**
@@ -47,7 +48,7 @@ public function __construct(HttpKernelInterface $http_kernel, $service_name = 's
  /**
   * {@inheritdoc}
   */
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE): Response {
    if ($type === self::MASTER_REQUEST && PHP_SAPI !== 'cli') {
      $session = $this->container->get($this->sessionServiceName);
      $session->start();
Loading