Skip to content

Commit

Permalink
add CI build for just DBAL without ORM
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher committed Oct 17, 2023
1 parent 09dc74c commit 7b1c44a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ jobs:
dependencies: "highest"
php-version: "8.2"

# DBAL only without ORM
- php-version: "8.2"
dependencies: "highest"
stability: "stable"
remove-orm: true

# Bleeding edge
- php-version: "8.2"
dependencies: "highest"
Expand Down Expand Up @@ -76,6 +82,10 @@ jobs:
run: "composer config minimum-stability stable"
if: "${{ matrix.stability == 'stable' }}"

- name: "Remove doctrine/orm"
run: "composer remove doctrine/orm --dev --no-update"
if: "${{ matrix.remove-orm }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
Expand Down
25 changes: 19 additions & 6 deletions Tests/DependencyInjection/DoctrineExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,10 @@ public function testAnnotationsBundleMappingDetection(): void
/** @requires PHP 8 */
public function testAttributesBundleMappingDetection(): void
{
if (! interface_exists(EntityManagerInterface::class)) {
self::markTestSkipped('This test requires ORM');
}

$container = $this->getContainer(['AttributesBundle']);
$extension = new DoctrineExtension();

Expand Down Expand Up @@ -1204,6 +1208,10 @@ public static function cacheConfigurationProvider(): array
/** @requires PHP 8 */
public function testAsEntityListenerAttribute()
{
if (! interface_exists(EntityManagerInterface::class)) {
self::markTestSkipped('This test requires ORM');
}

$container = $this->getContainer();
$extension = new DoctrineExtension();

Expand Down Expand Up @@ -1238,6 +1246,10 @@ public function testAsEntityListenerAttribute()
/** @requires PHP 8 */
public function testAsDoctrineListenerAttribute()
{
if (! interface_exists(EntityManagerInterface::class)) {
self::markTestSkipped('This test requires ORM');
}

$container = $this->getContainer();
$extension = new DoctrineExtension();

Expand Down Expand Up @@ -1271,7 +1283,7 @@ public function testRegistrationsWithMiddlewaresAndSfDebugMiddleware(): void
$container = $this->getContainer();
$extension = new DoctrineExtension();

$config = BundleConfigurationBuilder::createBuilderWithBaseValues()
$config = BundleConfigurationBuilder::createBuilder()
->addConnection([
'connections' => [
'conn1' => [
Expand All @@ -1293,7 +1305,6 @@ public function testRegistrationsWithMiddlewaresAndSfDebugMiddleware(): void
],
],
])
->addBaseEntityManager()
->build();

$extension->load([$config], $container);
Expand Down Expand Up @@ -1341,7 +1352,7 @@ public function testDefinitionsToLogAndProfile(): void
$container = $this->getContainer();
$extension = new DoctrineExtension();

$config = BundleConfigurationBuilder::createBuilderWithBaseValues()
$config = BundleConfigurationBuilder::createBuilder()
->addConnection([
'connections' => [
'conn1' => [
Expand All @@ -1356,7 +1367,6 @@ public function testDefinitionsToLogAndProfile(): void
],
],
])
->addBaseEntityManager()
->build();

$extension->load([$config], $container);
Expand Down Expand Up @@ -1395,7 +1405,7 @@ public function testDefinitionsToLogQueriesLoggingFalse(): void
$container = $this->getContainer();
$extension = new DoctrineExtension();

$config = BundleConfigurationBuilder::createBuilderWithBaseValues()
$config = BundleConfigurationBuilder::createBuilder()
->addConnection([
'connections' => [
'conn' => [
Expand All @@ -1404,7 +1414,6 @@ public function testDefinitionsToLogQueriesLoggingFalse(): void
],
],
])
->addBaseEntityManager()
->build();

$extension->load([$config], $container);
Expand All @@ -1421,6 +1430,10 @@ public function testDefinitionsToLogQueriesLoggingFalse(): void
*/
public function testControllerResolver(bool $simpleEntityManagerConfig): void
{
if (! interface_exists(EntityManagerInterface::class)) {
self::markTestSkipped('This test requires ORM');
}

$container = $this->getContainer();
$extension = new DoctrineExtension();
$config = BundleConfigurationBuilder::createBuilderWithBaseValues()->build();
Expand Down

0 comments on commit 7b1c44a

Please sign in to comment.