De-duplicate phpstan.php errors#4560
Merged
ondrejmirtes merged 8 commits intophpstan:2.1.xfrom Nov 17, 2025
Merged
Conversation
Collaborator
|
This pull request has been marked as ready for review. |
Member
|
Thank you! |
Member
|
Hey, I merged this too soon, there are some problems including CS and failing tests :) |
Contributor
Author
|
Hey, cs fix is here - the test errors seem pre-existing/unrelated to this PR. |
Contributor
|
What should happen when there are two identical errors on the same line? |
Contributor
Author
|
This PR affects only runtime php warnings/errors, which are not very likely to happen at all while running static analysis. It does not affect regular phpstan errors. I think its fine that we have each runtime warning/error only once per line, as such codes with multiple statements per line is also super rare. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes phpstan/phpstan#13813