We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi @muglug
I didn't succeed reproducing the issue in psalm.dev. But I have an open PR with commits about the issue: sonata-project/SonataAdminBundle#6713
In this PR:
public function getNewInstance() { $object = $this->getModelManager()->getModelInstance($this->getClass()); $this->appendParentObject($object); foreach ($this->getExtensions() as $extension) { $extension->alterNewInstance($this, $object); } return $object; }
Is reported as returning an object instead of the template T.
T
I find out that commenting
$this->appendParentObject($object);
fix the issue.
Then I find out that changing
/** * @phpstan-param T $object */ final protected function appendParentObject(object $object): void
to
/** * @phpstan-param T $object */ final protected function appendParentObject($object): void
I think that psalm shouldn't report anything. What is more weird, is that it's reporting an issue in the commit sonata-project/SonataAdminBundle@1c08c17 but not in the previous commit sonata-project/SonataAdminBundle@3091807
The text was updated successfully, but these errors were encountered:
Suppress psalm issue
e741383
See vimeo/psalm#4868
baf97b3
Is this still the case on latest master?
Sorry, something went wrong.
Yes, it is @muglug : sonata-project/SonataAdminBundle@1a8fa93
The issue was on me.
No branches or pull requests
Hi @muglug
I didn't succeed reproducing the issue in psalm.dev. But I have an open PR with commits about the issue:
sonata-project/SonataAdminBundle#6713
In this PR:
Is reported as returning an object instead of the template
T
.I find out that commenting
fix the issue.
Then I find out that changing
to
fix the issue.
I think that psalm shouldn't report anything.
What is more weird, is that it's reporting an issue in the commit
sonata-project/SonataAdminBundle@1c08c17
but not in the previous commit
sonata-project/SonataAdminBundle@3091807
The text was updated successfully, but these errors were encountered: