Skip to content

@deprecated tag MUST be explained #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lenaorobei opened this issue Aug 13, 2019 · 3 comments
Closed

@deprecated tag MUST be explained #131

lenaorobei opened this issue Aug 13, 2019 · 3 comments
Labels
enhancement Improvements to existing rules

Comments

@lenaorobei
Copy link
Contributor

Description

If classes/interfaces/functions/constants/class members are marked as @deprecated the description and @see tag must be provided.

Motivation behind the added @deprecated tag MUST be explained. @see tag MUST be used with reference to new implementation when code is deprecated and there is a new alternative.

Expected behavior

In PHPDoc blocs @deprecated tag must have description and following @see tag with reference.

Good example:

    /**
     * @var string
     * @deprecated 100.2.0 Useful description here.
     * @see /NameSpace/To/Implementation
     */
    protected $classMemberName;

Bad example:

    /**
     * @var string
     * @deprecated
     */
    protected $classMemberName;
@udovicic
Copy link
Member

If classes/interfaces/functions/constants/class members are marked as @deprecated [...]

Considering that functions sniff is currently in development (see #54), should we omit that one for now, or implement either way?

@lenaorobei
Copy link
Contributor Author

If you could create method in the helper class, I will ask @larsroettig to reuse it for functions formatting.

@larsroettig
Copy link
Member

larsroettig commented Aug 13, 2019 via email

udovicic added a commit to udovicic/magento-coding-standard that referenced this issue Aug 22, 2019
lenaorobei added a commit to udovicic/magento-coding-standard that referenced this issue Aug 26, 2019
udovicic pushed a commit to udovicic/magento-coding-standard that referenced this issue Aug 30, 2019
lenaorobei added a commit that referenced this issue Sep 4, 2019
magento-devops-reposync-svc pushed a commit that referenced this issue Nov 26, 2021
* AC-1060: Move relevant sniffs from PHPCompatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing rules
Projects
None yet
Development

No branches or pull requests

3 participants