mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #512] [CLOSED] Added addParameters() to Query and QueryBuilder #8305
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/512
Author: @jaspernbrouwer
Created: 11/13/2012
Status: ❌ Closed
Base:
master← Head:master📝 Commits (3)
fda9697Added addParameters() to Query and QueryBuilder5897787Fixed code style0ef76f8Fixed 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\ArrayCollectionwithDoctrine\ORM\Query\Parameterobjects, as well as a plainarraywith 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
setParameterswithaddParameters, in stead of going into your code and determine if calls tosetParametersare 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.