|
12 | 12 | namespace Symfony\Bridge\Doctrine\Tests\Types;
|
13 | 13 |
|
14 | 14 | use Doctrine\DBAL\Platforms\AbstractPlatform;
|
| 15 | +use Doctrine\DBAL\Platforms\MariaDBPlatform; |
15 | 16 | use Doctrine\DBAL\Platforms\MySQLPlatform;
|
16 | 17 | use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
17 | 18 | use Doctrine\DBAL\Platforms\SqlitePlatform;
|
@@ -140,13 +141,15 @@ public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string
|
140 | 141 | $this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform));
|
141 | 142 | }
|
142 | 143 |
|
143 |
| - public static function provideSqlDeclarations(): array |
| 144 | + public static function provideSqlDeclarations(): \Generator |
144 | 145 | {
|
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 | + } |
150 | 153 | }
|
151 | 154 |
|
152 | 155 | public function testRequiresSQLCommentHint()
|
|
0 commit comments