Change record status: 
Project: 
Introduced in branch: 
10.0.x
Introduced in version: 
10.0.0
Description: 

The Symfony 4 RequestStack BC shim Drupal\Core\Http\RequestStack is deprecated.

It was added to support RequestStack to have either getMainRequest() or getMasterRequest() methods.

Now Drupal 10 has moved to Symfony 6, this shim is no longer needed there and is deprecated for removal in Drupal 11.
There is no replacement, you can use the Symfony class Symfony\Component\HttpFoundation\RequestStack directly.

Impacts: 
Site builders, administrators, editors
Module developers

Comments

pcambra’s picture

robpowell’s picture

before

$this->requestStack->getPathInfo();

after

$this->requestStack->getCurrentRequest()->getPathInfo();

before

$this->requestStack->query->all()

after

$this->requestStack->getCurrentRequest()->query->all()