Skip to content

PHPStan errors being ignored should specify the error identifiers #1209

@westonruter

Description

@westonruter

This is part of #775.

Feature Description

A new feature coming in PHPStan 1.11 is the ability to ignore specific errors rather than all errors on a given line:

image

We should implement this for the few places we have ignores in place:

// @phpstan-ignore-next-line -- Ignored to test incorrect usage.

// @phpstan-ignore-next-line -- Ignored to test incorrect usage.

/** @phpstan-ignore-next-line */

// @phpstan-ignore-next-line -- Work around PHPStan remembering the return value above being null but now being a string. This is instead of adding rememberPossiblyImpureFunctionValues:false to the config.

This will ensure we're only ignoring the error we expect. This is coming out next week!

Metadata

Metadata

Assignees

Labels

[Type] EnhancementA suggestion for improvement of an existing featureskip changelogPRs that should not be mentioned in changelogs

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions