You are here

class RequestStack in Drupal 10

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Http/RequestStack.php \Drupal\Core\Http\RequestStack

Forward-compatibility shim for Symfony's RequestStack.

@todo Remove this in Drupal 11 https://www.drupal.org/node/3265121

Hierarchy

  • class \Drupal\Core\Http\RequestStack extends \Symfony\Component\HttpFoundation\RequestStack

Expanded class hierarchy of RequestStack

Deprecated

in drupal:10.0.0 and is removed from drupal:11.0.0. There is no replacement.

See also

https://www.drupal.org/node/3265357

1 file declares its use of RequestStack
RequestStackLegacyTest.php in core/tests/Drupal/Tests/Core/Http/RequestStackLegacyTest.php

File

core/lib/Drupal/Core/Http/RequestStack.php, line 20

Namespace

Drupal\Core\Http
View source
class RequestStack extends SymfonyRequestStack {

  /**
   * Gets the main request.
   *
   * @return \Symfony\Component\HttpFoundation\Request|null
   *   The main request.
   */
  public function getMainRequest() : ?Request {
    @trigger_error('The ' . __NAMESPACE__ . '\\RequestStack is deprecated in drupal:10.0.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3265357', E_USER_DEPRECATED);
    return parent::getMainRequest();
  }

}

Members