Skip to content

Commit a30bd1a

Browse files
committed
Deprecate calling QueryBuilder methods with an array argument
1 parent ce9b49c commit a30bd1a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

UPGRADE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ The usage of the `andX()` and `orX()` methods of the `ExpressionBuilder` class h
99
The usage of the `add()` and `addMultiple()` methods of the `CompositeExpression` class has been deprecated. Use `with()` instead, which returns a new instance.
1010
In the future, the `add*()` methods will be removed and the class will be effectively immutable.
1111

12+
## Deprecated calling `QueryBuilder` methods with an array argument
13+
14+
Calling the `select()`, `addSelect()`, `groupBy()` and `addGroupBy()` methods with an array argument is deprecated.
15+
1216
# Upgrade to 2.10
1317

1418
## Deprecated `Doctrine\DBAL\Event\ConnectionEventArgs` methods

lib/Doctrine/DBAL/Query/QueryBuilder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ public function add($sqlPartName, $sqlPart, $append = false)
451451
* Specifies an item that is to be returned in the query result.
452452
* Replaces any previously specified selections, if any.
453453
*
454+
* USING AN ARRAY ARGUMENT IS DEPRECATED. This feature will be removed in the next major version.
455+
*
454456
* <code>
455457
* $qb = $conn->createQueryBuilder()
456458
* ->select('u.id', 'p.id')
@@ -497,6 +499,8 @@ public function distinct() : self
497499
/**
498500
* Adds an item that is to be returned in the query result.
499501
*
502+
* USING AN ARRAY ARGUMENT IS DEPRECATED. This feature will be removed in the next major version.
503+
*
500504
* <code>
501505
* $qb = $conn->createQueryBuilder()
502506
* ->select('u.id')
@@ -869,6 +873,8 @@ public function orWhere($where)
869873
* Specifies a grouping over the results of the query.
870874
* Replaces any previously specified groupings, if any.
871875
*
876+
* USING AN ARRAY ARGUMENT IS DEPRECATED. This feature will be removed in the next major version.
877+
*
872878
* <code>
873879
* $qb = $conn->createQueryBuilder()
874880
* ->select('u.name')
@@ -894,6 +900,8 @@ public function groupBy($groupBy)
894900
/**
895901
* Adds a grouping expression to the query.
896902
*
903+
* USING AN ARRAY ARGUMENT IS DEPRECATED. This feature will be removed in the next major version.
904+
*
897905
* <code>
898906
* $qb = $conn->createQueryBuilder()
899907
* ->select('u.name')

0 commit comments

Comments
 (0)