diff --git a/composer.json b/composer.json index 7c525967..2d874dee 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "keywords": ["static analysis"], "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.2.2" + "phpstan/phpstan": "^2.2.10" }, "conflict": { "doctrine/collections": "<1.0", diff --git a/src/Type/Doctrine/QueryBuilder/OtherMethodQueryBuilderParser.php b/src/Type/Doctrine/QueryBuilder/OtherMethodQueryBuilderParser.php index f14913d2..153291f5 100644 --- a/src/Type/Doctrine/QueryBuilder/OtherMethodQueryBuilderParser.php +++ b/src/Type/Doctrine/QueryBuilder/OtherMethodQueryBuilderParser.php @@ -98,7 +98,7 @@ public function findQueryBuilderTypesInCalledMethod(Scope $scope, MethodReflecti return; } - $exprType = $scope->toMutatingScope()->getType($node->expr); + $exprType = $scope->getType($node->expr); TypeTraverser::map($exprType, static function (Type $type, callable $traverse) use (&$queryBuilderTypes): Type { if ($type instanceof UnionType || $type instanceof IntersectionType) {