Roave/BetterReflection

`psalm` runs broken on latest `5.0.x` due to stubs not being loaded

Ocramius opened this issue · 1 comments


ERROR: InvalidReturnType - src/Reflection/ReflectionFunctionAbstract.php:389:42 - The declared return type 'Roave\BetterReflection\Reflection\ReflectionNamedType|Roave\BetterReflection\Reflection\ReflectionUnionType|null' for Roave\BetterReflection\Reflection\ReflectionFunctionAbstract::createReturnType is incorrect, got 'Roave\BetterReflection\Reflection\ReflectionIntersectionType|Roave\BetterReflection\Reflection\ReflectionNamedType|Roave\BetterReflection\Reflection\ReflectionUnionType|null' (see https://psalm.dev/011)
    private function createReturnType(): ReflectionNamedType|ReflectionUnionType|null


ERROR: InvalidReturnStatement - src/Reflection/ReflectionFunctionAbstract.php:398:16 - The inferred type 'Roave\BetterReflection\Reflection\ReflectionIntersectionType|Roave\BetterReflection\Reflection\ReflectionNamedType|Roave\BetterReflection\Reflection\ReflectionUnionType' does not match the declared return type 'Roave\BetterReflection\Reflection\ReflectionNamedType|Roave\BetterReflection\Reflection\ReflectionUnionType|null' for Roave\BetterReflection\Reflection\ReflectionFunctionAbstract::createReturnType (see https://psalm.dev/128)
        return ReflectionType::createFromTypeAndReflector($returnType);


https://github.com/Roave/BetterReflection/runs/3973567477?check_suite_focus=true

This is strictly related to #818