Add rule to check Hook attribute doesn't start with hook_

Created on 13 January 2025, 3 months ago

Problem/Motivation

I was working on MR 10884 and accidentally use

#[Hook('hook_node_view')]

instead of

#[Hook('node_view')]

I think this can be catched with static code analysis.
I am not sure if what is best tool for that? phpcs, or phpstan?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

8.3

Component

Coder Sniffer

Created by

πŸ‡·πŸ‡ΊRussia zniki.ru

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

Comments & Activities

Production build 0.71.5 2024