You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: LessSpecificReturnType - The inferred return type 'Entity' for Foo::status is more specific than the declared return type 'Entity|null' (see https://psalm.dev/088)
private function status(int $leadId): ?Entity
Versions
Package
Version
vimeo/psalm
4.7.0
weirdan/doctrine-psalm-plugin
1.0.0
doctrine/orm
2.7.5
I've already tried to replace ?T with T|null locally (within the stubfile, and cleared cache afterwards) but that did not work as expected.
The text was updated successfully, but these errors were encountered:
Hey there,
somehow, psalm asserts that the return type of
find
is not nullable.The generic is properly detected tho.
Code
Psalm output
Versions
vimeo/psalm
4.7.0
weirdan/doctrine-psalm-plugin
1.0.0
doctrine/orm
2.7.5
I've already tried to replace
?T
withT|null
locally (within the stubfile, and cleared cache afterwards) but that did not work as expected.The text was updated successfully, but these errors were encountered: