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

Fix false positives on non-existing-offset's #3868

Merged
merged 2 commits into from
Mar 11, 2025
Merged

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Mar 10, 2025

as discussed in #3766 (comment) with this PR we detect some more array-dim fetch false-positive cases we see with reportPossiblyNonexistentGeneralArrayOffset.

closes phpstan/phpstan#11020

@staabm
Copy link
Contributor Author

staabm commented Mar 10, 2025

CI errors seem unrelated, except in shipmonk-rnd/dead-code-detector in which we now correctly no longer emit an error and therfore the // @phpstan-ignore offsetAccess.notFound phpdocs no longer have an error to ignore

https://github.com/shipmonk-rnd/dead-code-detector/blob/c218837a440e69f6ac231fd2f3d0c514d02a241f/src/Provider/ReflectionUsageProvider.php#L113C59-L113C96
https://github.com/shipmonk-rnd/dead-code-detector/blob/c218837a440e69f6ac231fd2f3d0c514d02a241f/src/Provider/ReflectionUsageProvider.php#L143

@staabm staabm marked this pull request as ready for review March 10, 2025 14:54
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

staabm added 2 commits March 11, 2025 07:46

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ondrejmirtes ondrejmirtes merged commit 54ca85b into phpstan:2.1.x Mar 11, 2025
415 of 417 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

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.

reportPossiblyNonexistentGeneralArrayOffset false positive
3 participants