Skip to content

Permit use of @deprecated on class variables #198

@FMCorz

Description

@FMCorz

The use of the @deprecated tag should be permitted on class variables as they are legitimate. The following code yield the error that follows.

class Test {

    /**
     * @var int No longer used.
     * @deprecated Use foo instead.
     */
    protected $something = 0;

}
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
 82 | WARNING | @deprecated tag is not allowed in member variable comment (moodle.Commenting.VariableComment.TagNotAllowed)

The @deprecated tag is used to document the deprecation version or other information of any element that can be documented except for page (global variable, include, constant, function, define, class, variable, method).

https://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.deprecated.pkg.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions