Commit 4ae6c5d7 authored by Elias Häußler's avatar Elias Häußler 🐛 Committed by Christian Kuhn
Browse files

[BUGFIX] Streamline typehints of variadic arguments in QueryBuilder

Doctrine uses mixed type for most of their method arguments in
QueryBuilder. Since TYPO3 core uses variadic arguments for some
methods in the wrapping QueryBuilder, argument types have been
streamlined to match the ones in the concrete QueryBuilder
instance from Doctrine.

Resolves: #96507
Related: #96457
Releases: main, 11.5, 10.4
Change-Id: I834240f764feac7af9fba7db0d45aaf4927abb2e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73010

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 44578fc2
......@@ -676,7 +676,7 @@ class QueryBuilder
* Specifies one or more restrictions to the query result.
* Replaces any previously specified restrictions, if any.
*
* @param array<int,mixed>|CompositeExpression $predicates
* @param string|CompositeExpression ...$predicates
* @return QueryBuilder This QueryBuilder instance.
*/
public function where(...$predicates): QueryBuilder
......@@ -690,7 +690,7 @@ class QueryBuilder
* Adds one or more restrictions to the query results, forming a logical
* conjunction with any previously specified restrictions.
*
* @param array<int,string>|CompositeExpression $where The query restrictions.
* @param string|CompositeExpression ...$where The query restrictions.
*
* @return QueryBuilder This QueryBuilder instance.
*
......@@ -707,7 +707,7 @@ class QueryBuilder
* Adds one or more restrictions to the query results, forming a logical
* disjunction with any previously specified restrictions.
*
* @param array<int,string>|CompositeExpression $where The WHERE statement.
* @param string|CompositeExpression ...$where The WHERE statement.
*
* @return QueryBuilder This QueryBuilder instance.
*
......@@ -724,7 +724,7 @@ class QueryBuilder
* Specifies a grouping over the results of the query.
* Replaces any previously specified groupings, if any.
*
* @param array<int,string> $groupBy The grouping expression.
* @param string ...$groupBy The grouping expression.
*
* @return QueryBuilder This QueryBuilder instance.
*/
......@@ -738,7 +738,7 @@ class QueryBuilder
/**
* Adds a grouping expression to the query.
*
* @param array<int,string> $groupBy The grouping expression.
* @param string ...$groupBy The grouping expression.
*
* @return QueryBuilder This QueryBuilder instance.
*/
......@@ -794,7 +794,7 @@ class QueryBuilder
* Specifies a restriction over the groups of the query.
* Replaces any previous having restrictions, if any.
*
* @param array<int,string>|CompositeExpression $having The restriction over the groups.
* @param mixed ...$having The restriction over the groups.
*
* @return QueryBuilder This QueryBuilder instance.
*/
......@@ -808,7 +808,7 @@ class QueryBuilder
* Adds a restriction over the groups of the query, forming a logical
* conjunction with any existing having restrictions.
*
* @param array<int,string>|CompositeExpression $having The restriction to append.
* @param mixed ...$having The restriction to append.
*
* @return QueryBuilder This QueryBuilder instance.
*/
......@@ -823,7 +823,7 @@ class QueryBuilder
* Adds a restriction over the groups of the query, forming a logical
* disjunction with any existing having restrictions.
*
* @param array<int,string>|CompositeExpression $having The restriction to add.
* @param mixed ...$having The restriction to add.
*
* @return QueryBuilder This QueryBuilder instance.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment