phpstan / phpstan-doctrine

Doctrine extensions for PHPStan
MIT License
595 stars 97 forks source link

QueryResultTypeWalker: fix nullability checks over unknown type #584

Closed janedbal closed 4 months ago

janedbal commented 4 months ago

Separated from https://github.com/phpstan/phpstan-doctrine/pull/506

Without this fix, the new testcase fails to add nullability and the inferred type does not accept the real result (invalid type was inferred). More mixed tests with all possible AST nodes is in the origin PR.

ondrejmirtes commented 4 months ago

Thank you.