Skip to content

Commit b1ff934

Browse files
authored
Merge pull request #1708 from dmaicher/dbal_only_ci
2 parents 9907ca1 + 9c3226d commit b1ff934

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
- "stable"
3131
symfony-require:
3232
- ""
33+
remove-orm:
34+
- false
3335
include:
3436
# Tests the lowest set of dependencies
3537
- dependencies: "lowest"
@@ -46,6 +48,12 @@ jobs:
4648
dependencies: "highest"
4749
php-version: "8.2"
4850

51+
# DBAL only without ORM
52+
- php-version: "8.2"
53+
dependencies: "highest"
54+
stability: "stable"
55+
remove-orm: true
56+
4957
# Bleeding edge
5058
- php-version: "8.2"
5159
dependencies: "highest"
@@ -76,6 +84,10 @@ jobs:
7684
run: "composer config minimum-stability stable"
7785
if: "${{ matrix.stability == 'stable' }}"
7886

87+
- name: "Remove doctrine/orm"
88+
run: "composer remove doctrine/orm --dev --no-update"
89+
if: "${{ matrix.remove-orm }}"
90+
7991
- name: "Install dependencies with Composer"
8092
uses: "ramsey/composer-install@v2"
8193
with:

Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,10 @@ public function testAnnotationsBundleMappingDetection(): void
850850
/** @requires PHP 8 */
851851
public function testAttributesBundleMappingDetection(): void
852852
{
853+
if (! interface_exists(EntityManagerInterface::class)) {
854+
self::markTestSkipped('This test requires ORM');
855+
}
856+
853857
$container = $this->getContainer(['AttributesBundle']);
854858
$extension = new DoctrineExtension();
855859

@@ -1204,6 +1208,10 @@ public static function cacheConfigurationProvider(): array
12041208
/** @requires PHP 8 */
12051209
public function testAsEntityListenerAttribute()
12061210
{
1211+
if (! interface_exists(EntityManagerInterface::class)) {
1212+
self::markTestSkipped('This test requires ORM');
1213+
}
1214+
12071215
$container = $this->getContainer();
12081216
$extension = new DoctrineExtension();
12091217

@@ -1238,6 +1246,10 @@ public function testAsEntityListenerAttribute()
12381246
/** @requires PHP 8 */
12391247
public function testAsDoctrineListenerAttribute()
12401248
{
1249+
if (! interface_exists(EntityManagerInterface::class)) {
1250+
self::markTestSkipped('This test requires ORM');
1251+
}
1252+
12411253
$container = $this->getContainer();
12421254
$extension = new DoctrineExtension();
12431255

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

1274-
$config = BundleConfigurationBuilder::createBuilderWithBaseValues()
1286+
$config = BundleConfigurationBuilder::createBuilder()
12751287
->addConnection([
12761288
'connections' => [
12771289
'conn1' => [
@@ -1293,7 +1305,6 @@ public function testRegistrationsWithMiddlewaresAndSfDebugMiddleware(): void
12931305
],
12941306
],
12951307
])
1296-
->addBaseEntityManager()
12971308
->build();
12981309

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

1344-
$config = BundleConfigurationBuilder::createBuilderWithBaseValues()
1355+
$config = BundleConfigurationBuilder::createBuilder()
13451356
->addConnection([
13461357
'connections' => [
13471358
'conn1' => [
@@ -1356,7 +1367,6 @@ public function testDefinitionsToLogAndProfile(): void
13561367
],
13571368
],
13581369
])
1359-
->addBaseEntityManager()
13601370
->build();
13611371

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

1398-
$config = BundleConfigurationBuilder::createBuilderWithBaseValues()
1408+
$config = BundleConfigurationBuilder::createBuilder()
13991409
->addConnection([
14001410
'connections' => [
14011411
'conn' => [
@@ -1404,7 +1414,6 @@ public function testDefinitionsToLogQueriesLoggingFalse(): void
14041414
],
14051415
],
14061416
])
1407-
->addBaseEntityManager()
14081417
->build();
14091418

14101419
$extension->load([$config], $container);
@@ -1421,6 +1430,10 @@ public function testDefinitionsToLogQueriesLoggingFalse(): void
14211430
*/
14221431
public function testControllerResolver(bool $simpleEntityManagerConfig): void
14231432
{
1433+
if (! interface_exists(EntityManagerInterface::class)) {
1434+
self::markTestSkipped('This test requires ORM');
1435+
}
1436+
14241437
$container = $this->getContainer();
14251438
$extension = new DoctrineExtension();
14261439
$config = BundleConfigurationBuilder::createBuilderWithBaseValues()->build();

Tests/ProfilerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public function testRender(): void
102102
'collector' => $this->collector,
103103
'queries' => $this->debugDataHolder->getData(),
104104
'profiler_markup_version' => 3,
105+
'profile_type' => 'request',
105106
]);
106107

107108
$expectedEscapedSql = 'SELECT
  *
FROM
  foo
WHERE
  bar IN (?, ?)
  AND "" >= ""';

0 commit comments

Comments
 (0)