Skip to content

Conversation

@staabm
Copy link

@staabm staabm commented Sep 16, 2024

while the previous return type was correct, it did not explicitly state/protect you from someone changing the collector and make it return a empty array.

thats a major problem which can happen, and I want to make sure this error will not bite you, like it did in my projects.

for in-detail context see phpstan/phpstan#11701 (comment)

@staabm
Copy link
Author

staabm commented Sep 16, 2024

I did not apply the fix to all collector classes in this repo - but I think you get the point and can do the rest on your own.

if you have any questions left, feel free to ask.

I am not a phpstan-latte user myself, therefore I did not take care of making this thing perfect. My primary motivation was to make sure people don't shoot their own feet because of problems with Collectors

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.

1 participant