Skip to content
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

support array in QueryBuilder::setParameters? #11491

Closed
dmaicher opened this issue Jun 10, 2024 · 1 comment
Closed

support array in QueryBuilder::setParameters? #11491

dmaicher opened this issue Jun 10, 2024 · 1 comment

Comments

@dmaicher
Copy link
Contributor

Feature Request

While looking into upgrading our largest app to ORM 3 (now unblocked since doctrine-extensions/DoctrineExtensions#2808 (comment)) I stumbled across the breaking change for QueryBuilder::setParameters that now only accepts ArrayCollection<int, Parameter> and no array anymore:

public function setParameters(ArrayCollection $parameters): static

However I noticed that AbstractQuery still accepts array as before:

public function setParameters(ArrayCollection|array $parameters): static

So I was wondering if there is a reason that those 2 are inconsistent and if we maybe could also allow array again on QueryBuilder::setParameters?

Otherwise I guess I would have to update the 100+ places to use ArrayCollection + Parameter instances or look into writing a rector rule for it 🙈

Q A
New Feature yes
RFC yes
BC Break no

Summary

Allow array again on QueryBuilder::setParameters to ease upgrade from ORM 2?

@dmaicher
Copy link
Contributor Author

I just now found #11292 (comment)

@dmaicher dmaicher closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2024
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

No branches or pull requests

1 participant