diff options
author | Joas Schilling <coding@schilljs.com> | 2024-07-04 11:26:17 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-07-19 11:21:16 +0200 |
commit | eeb6ddb176adc7488b74d004dceafee960603ebc (patch) | |
tree | 50c3bf5d7d1df99c9ea661f68eaded03b6dac3f4 /lib/public | |
parent | e45465781f1d9d6d64501dee46c8f4b4704e5918 (diff) | |
download | nextcloud-server-eeb6ddb176adc7488b74d004dceafee960603ebc.tar.gz nextcloud-server-eeb6ddb176adc7488b74d004dceafee960603ebc.zip |
fix(db): Deprecate `IExpressionBuilder::or()` and `IExpressionBuilder::and()` without parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/DB/QueryBuilder/IExpressionBuilder.php | 2 | ||||
-rw-r--r-- | lib/public/DB/QueryBuilder/IQueryBuilder.php | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index 6df9949cb75..26c7a36a6af 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -55,6 +55,7 @@ interface IExpressionBuilder { * * @return \OCP\DB\QueryBuilder\ICompositeExpression * @since 8.2.0 + * @since 30.0.0 Calling the method without any arguments is deprecated and will throw with the next Doctrine/DBAL update * * @psalm-taint-sink sql $x */ @@ -74,6 +75,7 @@ interface IExpressionBuilder { * * @return \OCP\DB\QueryBuilder\ICompositeExpression * @since 8.2.0 + * @since 30.0.0 Calling the method without any arguments is deprecated and will throw with the next Doctrine/DBAL update * * @psalm-taint-sink sql $x */ diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index 25f4111b759..11f9737ba2f 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -614,9 +614,10 @@ interface IQueryBuilder { * // You can optionally programmatically build and/or expressions * $qb = $conn->getQueryBuilder(); * - * $or = $qb->expr()->orx(); - * $or->add($qb->expr()->eq('u.id', 1)); - * $or->add($qb->expr()->eq('u.id', 2)); + * $or = $qb->expr()->orx( + * $qb->expr()->eq('u.id', 1), + * $qb->expr()->eq('u.id', 2), + * ); * * $qb->update('users', 'u') * ->set('u.password', md5('password')) |