Skip to content

Commit e7912e4

Browse files
sevequealanpoulain
authored andcommitted
Fix inversion of parameters gte et lte
1 parent 8aa4a12 commit e7912e4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Bridge/Doctrine/MongoDbOdm/Filter/RangeFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected function addMatch(Builder $aggregationBuilder, string $field, string $
7878
return;
7979
}
8080

81-
$aggregationBuilder->match()->field($matchField)->lte($rangeValue[0])->gte($rangeValue[1]);
81+
$aggregationBuilder->match()->field($matchField)->gte($rangeValue[0])->lte($rangeValue[1]);
8282

8383
break;
8484
case self::PARAMETER_GREATER_THAN:

tests/Bridge/Doctrine/MongoDbOdm/Filter/RangeFilterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,8 @@ public function provideApplyTestData(): array
444444
[
445445
'$match' => [
446446
'dummyPrice' => [
447-
'$lte' => '9.99',
448-
'$gte' => '15.99',
447+
'$gte' => '9.99',
448+
'$lte' => '15.99',
449449
],
450450
],
451451
],

0 commit comments

Comments
 (0)