Skip to content

Feature request: sniff to check that deprecation is properly handled #993

@jrfnl

Description

@jrfnl

In #979 (comment) :

Just thinking.... maybe we should create a sniff that checks for calls to any of the deprecated....() functions and ensures that there is a @deprecated tag and visa versa ?

Some ideas for what the sniff should check:

  • That a _deprecated_...() function is called whenever a @deprecated tag is encountered.
  • That a @deprecated tag is used whenever a _deprecated_...() function is called.
  • That the correct flavour of _deprecated_...() function is called.
  • That the version nrs in the tag and the function parameter are in line.
  • That the alternative listed in the tag and the function parameter are in line.
  • That __METHOD__ is used for methods, __FUNCTION__ for functions.

I propose the sniff be added to core based on all the issues related to this we've identified in PR #979.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions