File tree 2 files changed +10
-2
lines changed
tests/Rules/Doctrine/ORM/data
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ public function processArgs(
34
34
{
35
35
$ args = [];
36
36
foreach ($ methodCallArgs as $ arg ) {
37
+ if ($ arg ->unpack ) {
38
+ throw new DynamicQueryBuilderArgumentException ();
39
+ }
37
40
$ value = $ scope ->getType ($ arg ->value );
38
41
if (
39
42
$ value instanceof ExprType
Original file line number Diff line number Diff line change @@ -291,12 +291,17 @@ public function qbExprMethod(): void
291
291
$ queryBuilder ->getQuery ();
292
292
}
293
293
294
- public function bug602 (array $ objectConditions ): void
294
+ public function bug602 (array $ objectConditions, bool $ rand ): void
295
295
{
296
+ $ orParts = ['e.title LIKE :termLike ' ];
297
+ if ($ rand ) {
298
+ $ orParts [] = 'p.version = :term ' ;
299
+ }
296
300
$ queryBuilder = $ this ->entityManager ->createQueryBuilder ();
297
301
$ queryBuilder ->select ('e ' )
298
302
->from (MyEntity::class, 'e ' )
299
- ->andWhere ($ queryBuilder ->expr ()->orX (...$ objectConditions ));
303
+ ->andWhere ($ queryBuilder ->expr ()->orX (...$ orParts ))
304
+ ->setParameter ('termLike ' , 'someTerm ' );
300
305
}
301
306
302
307
}
You can’t perform that action at this time.
0 commit comments