-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
Fix #1000: Respect error_reporting #1001
Closed
PatchRanger
wants to merge
1
commit into
getsentry:master
from
PatchRanger:bugfix-1000-respect_error_reporting
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is something different. A
SilencedErrorException
is something like@foo()
, related to the@
silencing operator.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 see that it was designed as related to
@
. I see that Sentry has its own reporting level. My point is that the case of intentionally silenced by tweakingerror_reporting
warnings should be handled the same way.Let's review how it should work in such particular case:
error_reporting=E_ALL
.WARNING
: I want to see in my Sentry dashboard everything that equals or aboveWARNING
.error_reporting
level. The idea is to intentionally "skip" particular warning. I don't want to see it in my Sentry dashboard, it was silenced - just by another way than@
, see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Kernel.php#L431 .In my view tweaking
error_reporting
level should be considered as another way of intentionally silencing@
.Ok, I understand. I am going to rebase it to another branch once we reconcile the most appropriate way of dealing with this issue.
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.
You made me think, thank you :-)
I think there is no intersection:
Options::getErrorTypes()
controls whether to report or not. It uses the same constants and defaults toE_ALL
- but is totally independent oferror_reporting
setting: it is not controlled by tweakingerror_reporting
.error_reporting
impacts how to report the error: either silenced or usual way. It doesn't matter howerror_reporting
was tweaked: either by@
or manually - does it?setCaptureSilencedErrors
), which makes to report even silenced errors.In my view it works almost the same way as we already have: just the case of
0 === error_reporting()
was expanded to$level & error_reporting()
. Isn't it?:)