getsentry/sentry-symfony

Deprecation messages of ConsoleEvents::EXCEPTION when running console commands.

AivarasZelba opened this issue · 1 comments

Sentry still using console.exception event and it's deprecated since Symfony 3.3 Use console.error event instead.
This is a problem when running PHPUnit tests which runs console commands.

Hello there and thanks for reporting. This will not be fixed in the 1.0 release of the bundle, because it would mean doing some really dirty tricks or dropping support for SF <3.3.

This is instead already resolved in #90 that will become the 2.0 release; I also discourage you to enable this bundle in the test environment, since it will also change the error handler, which is already in use by other packages like Symfony's deprecation handler. Use something like this in your kernel:

        if (in_array($this->getEnvironment(), ['staging', 'prod'], true)) {
            $bundles[] = new Sentry\SentryBundle\SentryBundle();
        }

I'm closing this as already solved, but feel free to reply further if it's not a solution for you.