Code issue with \Drupal::getRequest() in D11

Created on 1 March 2025, about 1 month ago

API page: https://api.drupal.org/api/drupal/core%21includes%21form.inc/group/batch...

Enter a descriptive title (above), then describe the problem you have found:

Hello I've just faced an issue on the last line of this documentation:
$session = \Drupal::getRequest()->getSession();

I can propose:
$session = \Drupal::request()->getSession();

Regards.

📌 Task
Status

Active

Version

11.0 🔥

Component

documentation

Created by

🇫🇷France frondeau Nantes, FRANCE

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024