Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPStan errors being ignored should specify the error identifiers #1209

Closed
westonruter opened this issue May 9, 2024 · 0 comments · Fixed by #1213
Closed

PHPStan errors being ignored should specify the error identifiers #1209

westonruter opened this issue May 9, 2024 · 0 comments · Fixed by #1213
Assignees
Labels
skip changelog PRs that should not be mentioned in changelogs [Type] Enhancement A suggestion for improvement of an existing feature

Comments

@westonruter
Copy link
Member

westonruter commented May 9, 2024

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!

@westonruter westonruter added the [Type] Enhancement A suggestion for improvement of an existing feature label May 9, 2024
@westonruter westonruter added this to the performance-lab 3.1.0 milestone May 9, 2024
@westonruter westonruter self-assigned this May 14, 2024
@westonruter westonruter added the skip changelog PRs that should not be mentioned in changelogs label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog PRs that should not be mentioned in changelogs [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant