Skip to content

Add a stub for Criteria#125

Open
fluffycondor wants to merge 8 commits into
psalm:2.xfrom
fluffycondor:criteria-stub
Open

Add a stub for Criteria#125
fluffycondor wants to merge 8 commits into
psalm:2.xfrom
fluffycondor:criteria-stub

Conversation

@fluffycondor
Copy link
Copy Markdown
Contributor

No description provided.

@fluffycondor
Copy link
Copy Markdown
Contributor Author

Huh, I'm confused by this:
Cannot call a non-mutation-free method Doctrine\Common\Collections\Criteria::orderBy from a pure context
I've marked this method as @psalm-external-mutation-free because it mutates its own state only. The object is created inside the pure function and never will be user outside of it. Shouldn't @psalm-external-mutation-free be sufficient here? I don't understand how to fix it.

@AndrolGenhald
Copy link
Copy Markdown
Contributor

AndrolGenhald commented Aug 12, 2022

Sounds like vimeo/psalm#5615 to me, I'd just suppress it for now.

Edit: Wait, looks like this is going to happen for callers? Well, that's not so good. Maybe we really need to fix that in Psalm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants