Skip to content

[Feature] Add annotation @suppress to AnnotationReader #361

@Aerendir

Description

@Aerendir

I'm using Phan to statically analyze my code base.

It uses the annotation @suppress to suppress errors (ref.: https://github.com/phan/phan/wiki/Annotating-Your-Source-Code#suppress).

But the annotation @suppress is not read by Doctrine Annotations and I get the following error:

[ERROR] /Users/Aerendir/Documents/JooServer/Lab/Bundles/bundle-users/src/Command/AbstractUserCommand.php
Line: 23
Message: Could not parse class "SerendipityHQ\Bundle\UsersBundle\Command" for annotations. [Semantical Error]
The annotation "@Suppress" in property SerendipityHQ\Bundle\UsersBundle\Command\AbstractUserCommand::$user
was never imported. Did you maybe forget to add a "use" statement for this annotation?

I get it through php-translation/symfony-bundle, running the command translation:extract (opened issue: php-translation/symfony-bundle#420).

In this moment is practically impossible for me to extract new versions using the bundle.

The fix is as easy as adding the annotation to the AnnotationReader::$globalIgnoredNames.

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