-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
Enable SentryBundle only in the "prod" env #1080
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry but I'm 👎 on this. It would break a lot of test break on the user side, because usage of Sentry in code could implode due to services missing.
Also, depending on how much Sentry code is used into the users', it could make it impossible to run test at all.
This is only for new projects. Existing projects won't be affected. I think this is the correct default. |
This is a fragile assumption. If I need to enrich the data sent to Sentry, I may need to interact with parts of the bundle, or the bundle could interact with the data in unforeseen ways. Test may be broken; or worse, get false greens. |
That won't happen in any new projects. Yet, the default right now breaks inspecting test suites that erroneously alter the error handler without restoring it. |
Apart from the warning, it shouldn't break tests, we take care of passing through all errors to error handlers below. Furthermore, that will be solved by getsentry/sentry-symfony#337, but it's a lot of work to be done. |
correct, "Apart from the warning", which is not that a minor detail ;)
it's a lot of work yes! that's why I think we should do this change today, to relax the "pressure" on this issue. |
@Jean85 please consider my arguments. |
I still see many downsides in this way. Non having the bundle loaded will also not trigger any deprecation coming from the whole Sentry stack, for example. I'm against this because I personally reversed that approach from inside the bundle due to this getsentry/sentry-symfony#46 (comment) (and following discussion). |
Hm.. Indeed this will fix the problem and not affecting exiting users. But it seams like it is a workaround instead of fixing the actual cause. I'll follow getsentry/sentry-symfony#421 and see if we can come up with a better solution. |
My two cents: while it's true that this change won't affect existing users, it makes installing the bundle broken for new people because as any other bundle providing services, if my project relies on them it won't work in |
Fixes getsentry/sentry-symfony#421 (the part about `THE ERROR HANDLER HAS CHANGED!)