Skip to content

@deprecated without @see tag false positive #162

Closed
@ihor-sviziev

Description

@ihor-sviziev

Description

Originally this issue appeared here: magento/magento2#21235 (comment)

Run static tests against following file:

https://github.com/magento/magento2/blob/5b829a847852f9bcd5ea66d751e0454f33fa3716/app/code/Magento/Customer/Model/Customer.php#L64-L68

Right now you're getting following message:

PHP Code Sniffer detected 1 violation(s): 

FILE: /var/www/html/app/code/Magento/Customer/Model/Customer.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 68 | WARNING | 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.
----------------------------------------------------------------------



Failed asserting that 1 matches expected 0.

As we can see here - there is @see tag:
image

Expected behavior

You should not have any complains

Benefits

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions