Add dd_trace_reset function, and stop throwing exceptions when overriding missing methods #222
Merged
Merged
Conversation
14198c0 to
3d50896
Compare
3d50896 to
817478d
Compare
03991cd to
6655feb
Compare
labbati
requested changes
Jan 8, 2019
Member
labbati
left a comment
There was a problem hiding this comment.
Awesome stuff! Thanks @pawelchcki!
Just a added a couple of comments if they make sense to you.
| @@ -0,0 +1,55 @@ | |||
| --TEST-- | |||
Member
There was a problem hiding this comment.
Do you think that makes sense to add a test to make sure that the exception is not thrown? Something like
--TEST--
Check tracing of non existing classes, methods and functions.
--FILE--
<?php
class ClassWithNoMethods
{
}
dd_trace("ClassNotExist", "method" ,function(){});
dd_trace("ClassWithNoMethods", "method", function(){});
dd_trace("function_not_exist", function(){});
?>
--EXPECT--
Contributor
Author
There was a problem hiding this comment.
Ops I missed two files when submitting this PR. I'll do better next time. One of those files checked exactly what, you've been proposing.
labbati
reviewed
Jan 8, 2019
| @@ -1,13 +1,38 @@ | |||
| --TEST-- | |||
| Toggle checking if overridable method/function exists or not | |||
| Do not throw exceptions when veryfying if class/method and function existst. | |||
labbati
approved these changes
Jan 8, 2019
Member
labbati
left a comment
There was a problem hiding this comment.
Thanks for addressing this! 👍
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
dd_trace_resetsimply resets the lookup hashes to initial state, allowing removing of existing overrides - mostly usable for testsException throwing behavior is controlled by
ddtrace.ignore_missing_overridablesini setting that defaults totrueReadiness checklist