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
class Test { private Collection $collection; /** * @psalm-mutation-free */ public function test(): array { return $this->collection->toArray(); } }
ImpureMethodCall: Cannot call an possibly-mutating method Doctrine\Common\Collections\Collection::toArray from a mutation-free context
doctrine/orm 2.7.4 weirdan/doctrine-psalm-plugin 0.11.3 vimeo/psalm 3.18.2
The text was updated successfully, but these errors were encountered:
Is it implied to be mutation-free? I'd suggest to ask doctrine/collection devs (they are not very responsive though).
doctrine/collection
Sorry, something went wrong.
No branches or pull requests
ImpureMethodCall: Cannot call an possibly-mutating method Doctrine\Common\Collections\Collection::toArray from a mutation-free context
doctrine/orm 2.7.4
weirdan/doctrine-psalm-plugin 0.11.3
vimeo/psalm 3.18.2
The text was updated successfully, but these errors were encountered: