diff --git a/UPGRADE.md b/UPGRADE.md index beed13b5732..63dd8b279dd 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -9,6 +9,10 @@ The usage of the `andX()` and `orX()` methods of the `ExpressionBuilder` class h The usage of the `add()` and `addMultiple()` methods of the `CompositeExpression` class has been deprecated. Use `with()` instead, which returns a new instance. In the future, the `add*()` methods will be removed and the class will be effectively immutable. +## Deprecated calling `QueryBuilder` methods with an array argument + +Calling the `select()`, `addSelect()`, `groupBy()` and `addGroupBy()` methods with an array argument is deprecated. + # Upgrade to 2.10 ## Deprecated `Doctrine\DBAL\Event\ConnectionEventArgs` methods diff --git a/lib/Doctrine/DBAL/Query/QueryBuilder.php b/lib/Doctrine/DBAL/Query/QueryBuilder.php index 58d7062f0a7..1f050c681d8 100644 --- a/lib/Doctrine/DBAL/Query/QueryBuilder.php +++ b/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -451,6 +451,8 @@ public function add($sqlPartName, $sqlPart, $append = false) * Specifies an item that is to be returned in the query result. * Replaces any previously specified selections, if any. * + * USING AN ARRAY ARGUMENT IS DEPRECATED. This feature will be removed in the next major version. + * * * $qb = $conn->createQueryBuilder() * ->select('u.id', 'p.id') @@ -497,6 +499,8 @@ public function distinct() : self /** * Adds an item that is to be returned in the query result. * + * USING AN ARRAY ARGUMENT IS DEPRECATED. This feature will be removed in the next major version. + * * * $qb = $conn->createQueryBuilder() * ->select('u.id') @@ -869,6 +873,8 @@ public function orWhere($where) * Specifies a grouping over the results of the query. * Replaces any previously specified groupings, if any. * + * USING AN ARRAY ARGUMENT IS DEPRECATED. This feature will be removed in the next major version. + * * * $qb = $conn->createQueryBuilder() * ->select('u.name') @@ -894,6 +900,8 @@ public function groupBy($groupBy) /** * Adds a grouping expression to the query. * + * USING AN ARRAY ARGUMENT IS DEPRECATED. This feature will be removed in the next major version. + * * * $qb = $conn->createQueryBuilder() * ->select('u.name')