[PR #512] [CLOSED] Added addParameters() to Query and QueryBuilder #8305

Closed
opened 2026-01-22 15:59:19 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/512
Author: @jaspernbrouwer
Created: 11/13/2012
Status: Closed

Base: masterHead: master


📝 Commits (3)

  • fda9697 Added addParameters() to Query and QueryBuilder
  • 5897787 Fixed code style
  • 0ef76f8 Fixed code style

📊 Changes

4 files changed (+188 additions, -0 deletions)

View changed files

📝 lib/Doctrine/ORM/AbstractQuery.php (+42 -0)
📝 lib/Doctrine/ORM/QueryBuilder.php (+57 -0)
📝 tests/Doctrine/Tests/ORM/Query/QueryTest.php (+43 -0)
📝 tests/Doctrine/Tests/ORM/QueryBuilderTest.php (+46 -0)

📄 Description

This method behaves like setParameters() before version 2.3:
It will add new parameters to the collection, and override any existing positions/names.

It can take a Doctrine\Common\Collections\ArrayCollection with Doctrine\ORM\Query\Parameter objects, as well as a plain array with key/value pairs, as argument.

This will greatly ease the upgrade to Doctrine 2.3, because you only need to perform a project-wide replace of setParameters with addParameters, in stead of going into your code and determine if calls to setParameters are ok or need refactoring.

I've also added unit-tests to maintain integrity.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/512 **Author:** [@jaspernbrouwer](https://github.com/jaspernbrouwer) **Created:** 11/13/2012 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`fda9697`](https://github.com/doctrine/orm/commit/fda969768ee1f97985c5b7b47333ac37f5a53e97) Added addParameters() to Query and QueryBuilder - [`5897787`](https://github.com/doctrine/orm/commit/5897787139027f9cd9d820829fadeafaccb33e88) Fixed code style - [`0ef76f8`](https://github.com/doctrine/orm/commit/0ef76f86b5a99f292bac50da59e30b2341f760c7) Fixed code style ### 📊 Changes **4 files changed** (+188 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/AbstractQuery.php` (+42 -0) 📝 `lib/Doctrine/ORM/QueryBuilder.php` (+57 -0) 📝 `tests/Doctrine/Tests/ORM/Query/QueryTest.php` (+43 -0) 📝 `tests/Doctrine/Tests/ORM/QueryBuilderTest.php` (+46 -0) </details> ### 📄 Description This method behaves like `setParameters()` before version 2.3: It will add new parameters to the collection, and override any existing positions/names. It can take a `Doctrine\Common\Collections\ArrayCollection` with `Doctrine\ORM\Query\Parameter` objects, as well as a plain `array` with key/value pairs, as argument. This will greatly ease the upgrade to Doctrine 2.3, because you only need to perform a project-wide replace of `setParameters` with `addParameters`, in stead of going into your code and determine if calls to `setParameters` are ok or need refactoring. I've also added unit-tests to maintain integrity. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:59:19 +01:00
admin closed this issue 2026-01-22 15:59:19 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8305