Skip to content

Commit 0dfe3c9

Browse files
committed
Wrap stub definition in check for DBAL presence
1 parent aa1a48e commit 0dfe3c9

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

tests/Tracing/Doctrine/DBAL/TracingDriverTest.php

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -250,22 +250,24 @@ public function testConvertExceptionThrowsIfDoctrineDBALVersionIsAtLeast30(): vo
250250
}
251251
}
252252

253-
if (interface_exists(VersionAwarePlatformDriverInterface::class)) {
254-
interface StubVersionAwarePlatformDriverInterface extends DriverInterface, VersionAwarePlatformDriverInterface
255-
{
253+
if (interface_exists(DriverInterface::class)) {
254+
if (interface_exists(VersionAwarePlatformDriverInterface::class)) {
255+
interface StubVersionAwarePlatformDriverInterface extends DriverInterface, VersionAwarePlatformDriverInterface
256+
{
257+
}
256258
}
257-
}
258259

259-
if (interface_exists(ExceptionConverterDriverInterface::class)) {
260-
interface StubExceptionConverterDriverInterface extends ExceptionConverterDriverInterface, DriverInterface
261-
{
262-
}
263-
} else {
264-
interface StubExceptionConverterDriverInterface extends DriverInterface
265-
{
260+
if (interface_exists(ExceptionConverterDriverInterface::class)) {
261+
interface StubExceptionConverterDriverInterface extends ExceptionConverterDriverInterface, DriverInterface
262+
{
263+
}
264+
} else {
265+
interface StubExceptionConverterDriverInterface extends DriverInterface
266+
{
267+
}
266268
}
267-
}
268269

269-
if (!class_exists(DriverExceptionInterface::class)) {
270-
class_alias(Exception::class, DriverExceptionInterface::class);
270+
if (!class_exists(DriverExceptionInterface::class)) {
271+
class_alias(Exception::class, DriverExceptionInterface::class);
272+
}
271273
}

0 commit comments

Comments
 (0)