Skip to content

Commit

Permalink
Merge branch '7.1' into 7.2
Browse files Browse the repository at this point in the history
* 7.1:
  [Finder] Fix using `==` as default operator in `DateComparator`
  [HttpFoundation] Avoid mime type guess with temp files in `BinaryFileResponse`
  choose the correctly cased class name for the MariaDB platform
  • Loading branch information
fabpot committed Dec 30, 2024
2 parents 6de263e + b8b526e commit 87a7185
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Comparator/DateComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(string $test)
throw new \InvalidArgumentException(\sprintf('"%s" is not a valid date.', $matches[2]));
}

$operator = $matches[1] ?? '==';
$operator = $matches[1] ?: '==';
if ('since' === $operator || 'after' === $operator) {
$operator = '>';
}
Expand Down
1 change: 1 addition & 0 deletions Tests/Comparator/DateComparatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public static function getTestData()
['after 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]],
['since 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]],
['!= 2005-10-10', [strtotime('2005-10-11')], [strtotime('2005-10-10')]],
['2005-10-10', [strtotime('2005-10-10')], [strtotime('2005-10-11')]],
];
}
}

0 comments on commit 87a7185

Please sign in to comment.