Skip to content

Solution to partial analysis false positives over inline ignores#292

Open
janedbal wants to merge 1 commit intomasterfrom
partial-analysis
Open

Solution to partial analysis false positives over inline ignores#292
janedbal wants to merge 1 commit intomasterfrom
partial-analysis

Conversation

@janedbal
Copy link
Member

janedbal added a commit to janedbal/phpstan-src that referenced this pull request Feb 23, 2026
Custom ErrorFormatter implementations that need to filter or modify
file-specific errors currently have to call the AnalysisResult
constructor directly, which is not part of the public API.

This adds an @api withFileSpecificErrors() method that returns a copy
of the result with different file-specific errors, allowing extensions
to create modified results without relying on internal constructor.

See shipmonk-rnd/dead-code-detector#292
ondrejmirtes pushed a commit to phpstan/phpstan-src that referenced this pull request Feb 26, 2026
Custom ErrorFormatter implementations that need to filter or modify
file-specific errors currently have to call the AnalysisResult
constructor directly, which is not part of the public API.

This adds an @api withFileSpecificErrors() method that returns a copy
of the result with different file-specific errors, allowing extensions
to create modified results without relying on internal constructor.

See shipmonk-rnd/dead-code-detector#292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants