Repository navigation
fix: skip reviews from deleted GitHub accounts - #911
Merged
shyim merged 2 commits intoOct 13, 2026
Merged
Conversation
1 of 5 tasks
nfortier-shopware
force-pushed
the
fix/skip-reviews-from-deleted-users
branch
from
October 13, 2026 13:50
926c472 to
3dd3348
Compare
nfortier-shopware
marked this pull request as ready for review
October 13, 2026 13:52
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #911 +/- ##
=========================================
Coverage 98.90% 98.90%
- Complexity 309 311 +2
=========================================
Files 41 41
Lines 910 913 +3
=========================================
+ Hits 900 903 +3
Misses 10 10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
shyim
approved these changes
Oct 13, 2026
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.
Fixes #910
The reviews API returns
"user": nullfor a review written by an account that was deleted later.Github::getReviews()mapped every review to$review['user']['login']through a closure typed to returnstring, sodanger cidied with aTypeErrorbefore any rule ran, and kept dying on that pull request because such a review cannot be removed.Reviews without a user are now skipped when collecting the reviewer logins. A regression test loads a reviews payload that carries one.
The first commit declares the key type of
Collection::getIterator(). CI installs PHPStan 2.3.1 (the lock file is not committed), which rejects@return \Generator<T>as not covariant withIteratorAggregate<array-key, T>, somainis red on both the PHPStan job andCheckPhpStanTestwithout it.