diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f1bcd141..61c56e11 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -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" @@ -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: diff --git a/Tests/DependencyInjection/DoctrineExtensionTest.php b/Tests/DependencyInjection/DoctrineExtensionTest.php index 973b00cb..9b64c5b9 100644 --- a/Tests/DependencyInjection/DoctrineExtensionTest.php +++ b/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -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(); @@ -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(); @@ -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(); @@ -1271,7 +1283,7 @@ public function testRegistrationsWithMiddlewaresAndSfDebugMiddleware(): void $container = $this->getContainer(); $extension = new DoctrineExtension(); - $config = BundleConfigurationBuilder::createBuilderWithBaseValues() + $config = BundleConfigurationBuilder::createBuilder() ->addConnection([ 'connections' => [ 'conn1' => [ @@ -1293,7 +1305,6 @@ public function testRegistrationsWithMiddlewaresAndSfDebugMiddleware(): void ], ], ]) - ->addBaseEntityManager() ->build(); $extension->load([$config], $container); @@ -1341,7 +1352,7 @@ public function testDefinitionsToLogAndProfile(): void $container = $this->getContainer(); $extension = new DoctrineExtension(); - $config = BundleConfigurationBuilder::createBuilderWithBaseValues() + $config = BundleConfigurationBuilder::createBuilder() ->addConnection([ 'connections' => [ 'conn1' => [ @@ -1356,7 +1367,6 @@ public function testDefinitionsToLogAndProfile(): void ], ], ]) - ->addBaseEntityManager() ->build(); $extension->load([$config], $container); @@ -1395,7 +1405,7 @@ public function testDefinitionsToLogQueriesLoggingFalse(): void $container = $this->getContainer(); $extension = new DoctrineExtension(); - $config = BundleConfigurationBuilder::createBuilderWithBaseValues() + $config = BundleConfigurationBuilder::createBuilder() ->addConnection([ 'connections' => [ 'conn' => [ @@ -1404,7 +1414,6 @@ public function testDefinitionsToLogQueriesLoggingFalse(): void ], ], ]) - ->addBaseEntityManager() ->build(); $extension->load([$config], $container); @@ -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();