Repository navigation
chore: normalise Psalm annotations - #59
Merged
Merged
Conversation
build: read the generic protobuf RepeatedField in Psalm With ext-protobuf loaded, Psalm reflects the extension's untemplated RepeatedField instead of the vendor class, so the generated DTO's `RepeatedField<Item>` failed with TooManyTemplateParams; a stub of the vendor file fixes it with or without the extension. Suppressions Psalm reports as unused are dropped, and MixedAssignment suppressions become `@var mixed`, matching DefaultSerializer. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.x #59 +/- ##
==========================================
- Coverage 94.08% 93.58% -0.51%
==========================================
Files 13 13
Lines 186 187 +1
==========================================
Hits 175 175
- Misses 11 12 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
🔍 What was changed
src/follow one style: plain@paraminstead of@psalm-param,@var mixedinstead ofMixedAssignmentsuppressions,list<Item>where a list is built.@varon protobufgetItems()results are dropped now that Psalm infersRepeatedField<Item>.Review notes
psalm.xmlstubsvendor/google/protobuf/src/Google/Protobuf/RepeatedField.php: when ext-protobuf is loaded, it shadows the generic vendor class with an untemplated one, so the DTO'sRepeatedField<Item>failed withTooManyTemplateParams. The stub makes Psalm read the vendor class with or without the extension.set/setMultiple/setAsync/setMultipleAsyncnarrow the TTL topositive-intwith a suppression, while PSR-16 andAsyncStorageInterfaceallow anyint(zero or less means delete).withSerializer()declares@return $thisbut returns a clone;staticis correct but widens a public return type.Cache::createIndex()returnsarray<string, Item>, but digit-only keys becomeint, so the true type isarray<array-key, Item>.Checklist