-
Notifications
You must be signed in to change notification settings - Fork 660
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
InvalidArgument error introduced in 5.24 #10971
Comments
I did check for any stubs used, but in the whole project there is no stub for TwigFilter class. I do use |
Also please note that this syntax is in line with official Symfony docs for Lazy loaded twig extensions |
This error is showing up on more places now. E.g. in the Syfony\Console\Command\Command::setCode() function.
when I use Version 5.23 works just fine |
I found these snippets: https://psalm.dev/r/3c405968f1<?php
class Command{
/**
* @param callable $code
*/
public function setCode(callable $code): static
{
return $this;
}
}
class Code extends Command{
public function __construct(){
parent::setCode([$this, 'runCode']);
}
protected function runCode(): void
{}
}
|
Aha, the reason why I cannot reproduce this issue on psalm.dev is because it uses this version: Which does not contain the breaking PR #10839 @weirdan can you please look into this, as you reviewed the change and also it seems you are in charge of merging code into master branch, which is what psalm.dev uses? |
You can close the issue because it's already fixed in #10935. Just wait for a new release. |
The issue from the initial message here is resolved, but the issue with setting protected function remains. Should I close this one and open a new one, or keep this one open? See #10935 (comment) |
Getting this error:
With the below code
Note that the TwigFilter source does not specify static nor public property for callable:
I am unable to reproduce this on psalm.dev
I am getting this on all projects with psalm 5.24, but it works fine with 5.23
The text was updated successfully, but these errors were encountered: