Skip to content

Commit

Permalink
Run high-deps tests with ORM 3 and DBAL 4
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Oct 11, 2023
1 parent ed4055b commit f411119
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions Tests/Store/DoctrineDbalStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,22 @@ public function testCreatesTableInTransaction(string $platform)
$store->save($key);
}

public static function providePlatforms()
public static function providePlatforms(): \Generator
{
yield [\Doctrine\DBAL\Platforms\PostgreSQLPlatform::class];
yield [\Doctrine\DBAL\Platforms\PostgreSQL94Platform::class];

// DBAL < 4
if (class_exists(\Doctrine\DBAL\Platforms\PostgreSQL94Platform::class)) {
yield [\Doctrine\DBAL\Platforms\PostgreSQL94Platform::class];
}

yield [\Doctrine\DBAL\Platforms\SqlitePlatform::class];
yield [\Doctrine\DBAL\Platforms\SQLServerPlatform::class];
yield [\Doctrine\DBAL\Platforms\SQLServer2012Platform::class];

// DBAL < 4
if (class_exists(\Doctrine\DBAL\Platforms\SQLServer2012Platform::class)) {
yield [\Doctrine\DBAL\Platforms\SQLServer2012Platform::class];
}
}

public function testTableCreationInTransactionNotSupported()
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"doctrine/dbal": "^2.13|^3.0",
"doctrine/dbal": "^2.13|^3|^4",
"predis/predis": "~1.0"
},
"conflict": {
Expand Down

0 comments on commit f411119

Please sign in to comment.