New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error in reconciler in vimeo/psalm:^1.1 #819
Comments
Does it also occur with You can find the line it triggers on with |
on
back on /**
* @var array<int, static> $out
*/
$out = array_filter(
static::rows($ids),
function (self $row) : bool {
return is_a($row, static::class);
}
); changing the filter to this: function (self $row) : bool {
return is_a(get_class($row), static::class, true);
} resolves in this error message: so looks like psalm is tripping up on the use of non-string |
What's the return type of |
2MB is kinda tight. Psalm takes 19MB here on an empty project. |
Yeah 2MB isn't the default: https://github.com/vimeo/psalm/blob/master/src/psalm.php#L12 |
Fatal error aside, I think that’s the right complaint (the arg expects a non-null value). Unless array_filter already strips out non-null values? |
@muglug the error is correctly reported with |
Reproducible with class A {
/**
* @return array<int, self|null>
*/
public function getRows() : array {
return [new self, null];
}
public function filter() : void {
$arr = array_filter(
static::getRows(),
function (self $row) : bool {
return is_a($row, static::class);
}
);
}
} |
The latest 1.x branch has those updates - I'll try and get a release out today |
ty |
still have to dig through our code for the cause, but there's something we're doing that's triggering this error in psalm 1.1
The text was updated successfully, but these errors were encountered: