Skip to content

PostgreSqlStore breaks Sentry usage due to hard-coded instanceof checks. #43048

Closed
@FractalizeR

Description

@FractalizeR

PostgreSqlStore of any version up to 6.0 has a hard-coded switch in it's code here:

                case $driver instanceof \Doctrine\DBAL\Driver\PDOPgSql\Driver:
                case $driver instanceof \Doctrine\DBAL\Driver\PDO\PgSQL\Driver:
                    break;
                default:
                    throw new InvalidArgumentException(sprintf('The adapter "%s" does not support the "%s" driver.', __CLASS__, \get_class($driver)));
            }

So you just get an exception "The adapter "Symfony\Component\Lock\Store\PostgreSqlStore" does not support the "Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriver" driver." when using Sentry with PostgreSqlStore.

There is a similar issue with Symfony cache here. Filed Sentry issue here also: getsentry/sentry-symfony#558

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions