-
Notifications
You must be signed in to change notification settings - Fork 185
Closed
Labels
Milestone
Description
Since sentry/sentry-symfony version 4.1.0, new doctrine/dbal polyfills were added:
sentry-symfony/src/aliases.php
Lines 97 to 120 in b2500fb
if (interface_exists(Statement::class) && !interface_exists(Result::class)) { | |
/** @psalm-suppress UndefinedClass */ | |
class_alias(Statement::class, Result::class); | |
} | |
if (interface_exists(DriverExceptionInterface::class) && !interface_exists(LegacyDriverExceptionInterface::class)) { | |
/** @psalm-suppress UndefinedClass */ | |
class_alias(DriverExceptionInterface::class, LegacyDriverExceptionInterface::class); | |
} | |
if (!interface_exists(DoctrineMiddlewareInterface::class)) { | |
/** @psalm-suppress UndefinedClass */ | |
class_alias(MiddlewareInterface::class, DoctrineMiddlewareInterface::class); | |
} | |
if (!interface_exists(DoctrineDriverInterface::class)) { | |
/** @psalm-suppress UndefinedClass */ | |
class_alias(DriverInterface::class, DoctrineDriverInterface::class); | |
} | |
if (!interface_exists(LegacyExceptionConverterDriverInterface::class)) { | |
/** @psalm-suppress UndefinedClass */ | |
class_alias(ExceptionConverterDriverInterface::class, LegacyExceptionConverterDriverInterface::class); | |
} |
Related PR: #423
This has the effect of misleading code based on the existence, or not, of these doctrine/dbal v2 interfaces.
As basing the detection only on that is maybe not a great idea, creating polyfill for 3rd party library seems to be quite odd too.
greg0ire, dmaicher and demenkov