Skip to content

Commit 73744f9

Browse files
committed
Merge branch '1.3.x' into 1.4.x
2 parents ce6afae + f9555a2 commit 73744f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Type/Doctrine/Query/QueryResultTypeWalker.php

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use PHPStan\Type\IntegerType;
2727
use PHPStan\Type\IntersectionType;
2828
use PHPStan\Type\MixedType;
29+
use PHPStan\Type\NeverType;
2930
use PHPStan\Type\NullType;
3031
use PHPStan\Type\ObjectType;
3132
use PHPStan\Type\StringType;
@@ -1326,6 +1327,9 @@ private function resolveDoctrineType(string $typeName, ?string $enumType = null,
13261327
$type = $this->descriptorRegistry
13271328
->get($typeName)
13281329
->getWritableToPropertyType();
1330+
if ($type instanceof NeverType) {
1331+
$type = new MixedType();
1332+
}
13291333
} catch (DescriptorNotRegisteredException $e) {
13301334
$type = new MixedType();
13311335
}

0 commit comments

Comments
 (0)