Skip to content

Option to disable phpstan-ignore-line and phpstan-ignore-next-line #11340

Open
phpstan/phpstan-src
#3976
@villfa

Description

@villfa

Feature request

Hi,

With the release of version 1.11, a new annotation, @phpstan-ignore, was introduced, allowing developers to specify an error identifier as a parameter. This feature provides a significant advantage over @phpstan-ignore-line and @phpstan-ignore-next-line, as it targets specific error identifiers rather than ignoring all potential errors on a given line. Consequently, it ensures that any new violations introduced on the same line are detected, improving overall code quality and reducing the risk of missing critical issues.

Given these benefits, I would like to request the addition of a configuration option to disable the use of @phpstan-ignore-line and @phpstan-ignore-next-line. By enabling this configuration, development teams can enforce the use of @phpstan-ignore with specific error identifiers, thereby promoting more precise and reliable error handling.

I believe that this feature will be a valuable addition to PHPStan, encouraging best practices and helping developers maintain higher standards of code quality.

Did PHPStan help you today? Did it make you happy in any way?

Thank you for considering this request. I appreciate your continued efforts in making PHPStan an indispensable tool for the PHP community.

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