Skip to content

Commit 0dd8013

Browse files
committed
Merge branch '5.4' into 6.2
* 5.4: Add test cases for MariaDBPlatform
2 parents 3a5ed31 + 708ed45 commit 0dd8013

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

Tests/Types/UlidTypeTest.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bridge\Doctrine\Tests\Types;
1313

1414
use Doctrine\DBAL\Platforms\AbstractPlatform;
15+
use Doctrine\DBAL\Platforms\MariaDBPlatform;
1516
use Doctrine\DBAL\Platforms\MySQLPlatform;
1617
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
1718
use Doctrine\DBAL\Platforms\SqlitePlatform;
@@ -140,13 +141,15 @@ public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string
140141
$this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform));
141142
}
142143

143-
public static function provideSqlDeclarations(): array
144+
public static function provideSqlDeclarations(): \Generator
144145
{
145-
return [
146-
[new PostgreSQLPlatform(), 'UUID'],
147-
[new SqlitePlatform(), 'BLOB'],
148-
[new MySQLPlatform(), 'BINARY(16)'],
149-
];
146+
yield [new PostgreSQLPlatform(), 'UUID'];
147+
yield [new SqlitePlatform(), 'BLOB'];
148+
yield [new MySQLPlatform(), 'BINARY(16)'];
149+
150+
if (class_exists(MariaDBPlatform::class)) {
151+
yield [new MariaDBPlatform(), 'BINARY(16)'];
152+
}
150153
}
151154

152155
public function testRequiresSQLCommentHint()

Tests/Types/UuidTypeTest.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bridge\Doctrine\Tests\Types;
1313

1414
use Doctrine\DBAL\Platforms\AbstractPlatform;
15+
use Doctrine\DBAL\Platforms\MariaDBPlatform;
1516
use Doctrine\DBAL\Platforms\MySQLPlatform;
1617
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
1718
use Doctrine\DBAL\Platforms\SqlitePlatform;
@@ -152,13 +153,15 @@ public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string
152153
$this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform));
153154
}
154155

155-
public static function provideSqlDeclarations(): array
156+
public static function provideSqlDeclarations(): \Generator
156157
{
157-
return [
158-
[new PostgreSQLPlatform(), 'UUID'],
159-
[new SqlitePlatform(), 'BLOB'],
160-
[new MySQLPlatform(), 'BINARY(16)'],
161-
];
158+
yield [new PostgreSQLPlatform(), 'UUID'];
159+
yield [new SqlitePlatform(), 'BLOB'];
160+
yield [new MySQLPlatform(), 'BINARY(16)'];
161+
162+
if (class_exists(MariaDBPlatform::class)) {
163+
yield [new MariaDBPlatform(), 'BINARY(16)'];
164+
}
162165
}
163166

164167
public function testRequiresSQLCommentHint()

0 commit comments

Comments
 (0)