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 533e664 + 5b36afa commit 1abbc58
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Tests/Transport/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Doctrine\DBAL\Connection as DBALConnection;
use Doctrine\DBAL\Exception as DBALException;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\MariaDb1060Platform;
use Doctrine\DBAL\Platforms\MariaDBPlatform;
use Doctrine\DBAL\Platforms\MySQL57Platform;
use Doctrine\DBAL\Platforms\MySQL80Platform;
Expand Down Expand Up @@ -591,9 +590,16 @@ class_exists(MySQLPlatform::class) ? new MySQLPlatform() : new MySQL57Platform()
'SELECT m.* FROM messenger_messages m WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC LIMIT 1 FOR UPDATE',
];

if (class_exists(MariaDb1060Platform::class)) {
if (interface_exists(DBALException::class)) {
// DBAL 4+
$mariaDbPlatformClass = 'Doctrine\DBAL\Platforms\MariaDB1060Platform';
} else {
$mariaDbPlatformClass = 'Doctrine\DBAL\Platforms\MariaDb1060Platform';
}

if (class_exists($mariaDbPlatformClass)) {
yield 'MariaDB106' => [
new MariaDb1060Platform(),
new $mariaDbPlatformClass(),
'SELECT m.* FROM messenger_messages m WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC LIMIT 1 FOR UPDATE SKIP LOCKED',
];
}
Expand Down

0 comments on commit 1abbc58

Please sign in to comment.