False positive with hook_update_dependencies()

Created on 31 August 2024, 7 months ago

Problem/Motivation

I'm getting:

Move the "mymodule_update_dependencies" function declaration
     |       | to a helper class implementing ContainerInjectionInterface.
     |       | Example can be found at
     |       | https://git.drupalcode.org/project/drupal/blob/8.7.5/core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install
(QualityAssurance.InstallFiles.FunctionDeclarations.NonHookFound)

Steps to reproduce

Implement hook_update_dependencies() in an .install file.

Proposed resolution

Add as exception because such implementations are legit in .install

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Closed: works as designed

Version

8.3

Component

Coder Sniffer

Created by

🇷🇴Romania claudiu.cristea Arad 🇷🇴

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

Comments & Activities

Production build 0.71.5 2024