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

Refactor ORM QueryBuilder::setParameters() calls to use setParameter() instead due to a stricter type in 3.0 #2710

Merged

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Oct 17, 2023

For B/C, the ORM's QueryBuilder::setParameters() (plural) method has continued to accept a plain array throughout 2.x, but in 3.0 it is typehinted as an ArrayCollection. So instead of having to pass a collection of Parameter objects, emulating the internals of setParameter() (singular), this just updates the code to call the setParameter() method one-by-one (which shouldn't hurt any since these are only 2-item arrays).

After #2639 it should be more feasible to see where some of the pain points lie, but for now, another piece of low-hanging fruit is knocked down.

@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (43073e0) 79.68% compared to head (67fe1ea) 79.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2710      +/-   ##
==========================================
- Coverage   79.68%   79.67%   -0.01%     
==========================================
  Files         162      162              
  Lines        8455     8452       -3     
==========================================
- Hits         6737     6734       -3     
  Misses       1718     1718              
Files Coverage Δ
...atable/Entity/Repository/TranslationRepository.php 83.78% <100.00%> (-0.29%) ⬇️
src/Translatable/Mapping/Event/Adapter/ORM.php 88.73% <100.00%> (-0.16%) ⬇️
src/Tree/Strategy/ORM/Nested.php 94.91% <100.00%> (+0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@franmomu franmomu requested a review from phansys October 23, 2023 06:30
@phansys phansys merged commit 1a3a3ae into doctrine-extensions:main Oct 23, 2023
21 checks passed
@phansys
Copy link
Collaborator

phansys commented Oct 23, 2023

Thank you @mbabker!

@mbabker mbabker deleted the set-parameters-requires-collection branch October 23, 2023 16:12
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.

3 participants