Skip to content

Commit f411119

Browse files
committed
Run high-deps tests with ORM 3 and DBAL 4
1 parent ed4055b commit f411119

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

Tests/Store/DoctrineDbalStoreTest.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,22 @@ public function testCreatesTableInTransaction(string $platform)
150150
$store->save($key);
151151
}
152152

153-
public static function providePlatforms()
153+
public static function providePlatforms(): \Generator
154154
{
155155
yield [\Doctrine\DBAL\Platforms\PostgreSQLPlatform::class];
156-
yield [\Doctrine\DBAL\Platforms\PostgreSQL94Platform::class];
156+
157+
// DBAL < 4
158+
if (class_exists(\Doctrine\DBAL\Platforms\PostgreSQL94Platform::class)) {
159+
yield [\Doctrine\DBAL\Platforms\PostgreSQL94Platform::class];
160+
}
161+
157162
yield [\Doctrine\DBAL\Platforms\SqlitePlatform::class];
158163
yield [\Doctrine\DBAL\Platforms\SQLServerPlatform::class];
159-
yield [\Doctrine\DBAL\Platforms\SQLServer2012Platform::class];
164+
165+
// DBAL < 4
166+
if (class_exists(\Doctrine\DBAL\Platforms\SQLServer2012Platform::class)) {
167+
yield [\Doctrine\DBAL\Platforms\SQLServer2012Platform::class];
168+
}
160169
}
161170

162171
public function testTableCreationInTransactionNotSupported()

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"symfony/polyfill-php80": "^1.16"
2323
},
2424
"require-dev": {
25-
"doctrine/dbal": "^2.13|^3.0",
25+
"doctrine/dbal": "^2.13|^3|^4",
2626
"predis/predis": "~1.0"
2727
},
2828
"conflict": {

0 commit comments

Comments
 (0)