Generated with the help of an LLM.

Problem/Motivation

Two autowired hook classes in the file module call \Drupal when they could have the service injected:

  • FileHooks::help(): \Drupal::moduleHandler() (2 calls).
  • FileRequirements::runtime(): \Drupal::request() (1 call).

Steps to reproduce

Proposed resolution

Add a ModuleHandlerInterface constructor parameter to FileHooks. Add a RequestStack constructor parameter to FileRequirements. Autowiring supplies both.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3637868

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kim.pepper created an issue. See original summary.

kim.pepper’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems straight forward to me.