Skip to content

Introduce a sniff to check whether a @since annotation is present for each function. #1827

@mi5t4n

Description

@mi5t4n

Description

In CMS projects, functions usually include a @since annotation to indicate the version they were introduced in. This helps plugin and integration developers maintain compatibility with different CMS versions.

It would be really useful to have a sniff that checks whether functions have a @since tag in their docblocks. This would help keep documentation consistent and avoid undocumented API changes.

Reference (WordPress example):
https://github.com/WordPress/wordpress-develop/blob/cd5b7b140a230713c06d97d2fd4a3dac947e0e5c/src/wp-includes/post.php#L872-L886

Let me know if you’re open to adding this sniff to your sniff repository—I’m happy to work on it and submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions