Skip to content

Conversation

@calebdw
Copy link
Contributor

@calebdw calebdw commented Sep 1, 2025

Hello!

I just PR'd larastan/larastan#2346 which allows PHPStan to understand the correct type returned from pluck() calls. However, Rector wasn't updating any usages from ->toArray() to ->all(). It turns out that Rector is doing some normalization behind the scenes and the type returned from $this->getType() does not contain any generic information.

Updating the rule to use $scope->getType() fixed this issue.

Thanks!

@calebdw calebdw force-pushed the calebdw/push-qsvxnxkpmwwm branch from 8c98261 to bd1b702 Compare September 1, 2025 01:40
@calebdw calebdw force-pushed the calebdw/push-qsvxnxkpmwwm branch from bd1b702 to 7a9bd2f Compare September 1, 2025 01:42
@GeniJaho GeniJaho merged commit 2368e10 into driftingly:main Sep 17, 2025
5 checks passed
@calebdw calebdw deleted the calebdw/push-qsvxnxkpmwwm branch September 17, 2025 19:46
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.

2 participants