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 :see_no_evil:
Q
A
New Feature
yes
RFC
yes
BC Break
no
Summary
Allow array again on QueryBuilder::setParameters to ease upgrade from ORM 2?
Feature Request
While looking into upgrading our largest app to ORM 3 (now unblocked since https://github.com/doctrine-extensions/DoctrineExtensions/issues/2808#issuecomment-2157297748) I stumbled across the breaking change for
QueryBuilder::setParameters
that now only acceptsArrayCollection<int, Parameter>
and noarray
anymore:https://github.com/doctrine/orm/blob/9d4f54b9a476f13479c3845350b12c466873fc42/src/QueryBuilder.php#L474
However I noticed that
AbstractQuery
still acceptsarray
as before:https://github.com/doctrine/orm/blob/9d4f54b9a476f13479c3845350b12c466873fc42/src/AbstractQuery.php#L303
So I was wondering if there is a reason that those 2 are inconsistent and if we maybe could also allow
array
again onQueryBuilder::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 :see_no_evil:Summary
Allow
array
again onQueryBuilder::setParameters
to ease upgrade from ORM 2?