-
Notifications
You must be signed in to change notification settings - Fork 672
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
invalid ParamNameMismatch with classes extending php_user_filter
#10662
Labels
Comments
I found these snippets: https://psalm.dev/r/f3e7bae361<?php
class NoopFilter extends \php_user_filter
{
/**
* @param resource $in
* @param resource $out
* @param int $consumed
*/
public function filter($in, $out, &$consumed, bool $closing): int
{
return PSFS_PASS_ON;
}
}
|
Also affects methods/functions called with named arguments: https://psalm.dev/r/093960fb7a |
I found these snippets: https://psalm.dev/r/093960fb7a<?php
function s(SQLite3Stmt $s): void {
$v = null;
$s->bindParam(
param: 1,
var: $v,
);
}
function f(Collator $c): void {
collator_sort(object: $c, array: [123]);
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://psalm.dev/r/f3e7bae361
the method's third parameter is supposed to be
consumed
, notrw_consumed
. See https://www.php.net/php_user_filterI think the rw_-prefix comes from the callmap because the parameter is in/out and those prefixes should probably be ignored in general when checking for parameter name matching.
The text was updated successfully, but these errors were encountered: