Don't use \Drupal::request() in BreadcrumbBuilder

Created on 3 March 2025, about 2 months ago

Problem/Motivation

phpstan is complaining about this: https://git.drupalcode.org/project/current_page_crumb/-/jobs/4546787
Using \Drupal:: to call services is a bad practice, dependency injection should be used instead.

Steps to reproduce

Proposed resolution

The request_stack service should be injected in the constructor of BreadcrumbBuilder.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇫🇷France prudloff Lille

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

Comments & Activities

Production build 0.71.5 2024