Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning with Symfony 6 #580

Closed
frame opened this issue Dec 14, 2021 · 2 comments
Closed

Deprecation warning with Symfony 6 #580

frame opened this issue Dec 14, 2021 · 2 comments

Comments

@frame
Copy link

frame commented Dec 14, 2021

Environment

sentry/sentry-symfony 4.2.5
doctrine/dbal 3.2.0
Symfony - 6.0.1

Steps to Reproduce

Run any code, look for deprecations warnings

Expected Result

No deprecation warning

Actual Result

Deprecated: The "Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingServerInfoAwareDriverConnection" class implements "Doctrine\DBAL\Driver\ServerInfoAwareConnection" that is deprecated The methods defined in this interface will be made part of the {@link Driver} interface in the next major release.

Note: This is not quite the same as issue 579 but might be related.

@ste93cry
Copy link
Collaborator

Apart from the fact that the intent of the deprecation makes it possible to remove a bunch of code that was added to wrap conditionally the TracingDriverConnection connection when the original one implemented the ServerInfoAwareConnection interface, I don't think there is a way to solve the issue related to the deprecation being raised: in fact, a runtime deprecation is now raised if you don't implement the interface here, but the interface itself in turn is marked as deprecated and Symfony blindly parses the annotation and throws the notice. The only thing that you can do is to suppress the error

@frame
Copy link
Author

frame commented Dec 14, 2021

Thanks for your detailed reply, @ste93cry. I wasn't able to hide the error log entry via the SYMFONY_DEPRECATIONS_HELPER env variable, so I've decided to patch the @depricated annotation from the vendor package (./vendor/doctrine/dbal/src/Driver/ServerInfoAwareConnection.php). I left this comment so others might use the same approach before creating a similar ticket.

@frame frame closed this as completed Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants