-
Notifications
You must be signed in to change notification settings - Fork 20
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
Simplify modes, allow stacking them, no tracking by default. Improve README #24
Conversation
|
||
$message .= sprintf( | ||
' (%s:%d called by %s:%d, %s, package %s)', | ||
basename($backtrace[0]['file']), |
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.
basename()
is potentially slow and locale-sensitive, which means not able to handle all locales.
I'd suggest removing the file+line info from the message altogether, the userland error handler can compute them at will (many already do so.)
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.
PHP never ceases to amaze :) i will reimplement the function
I have the stacktrace anyways for outside detection and having this in the message gives a 80/20 useful information.
For example PHPunit bridge requires additional configuration before it Shaws stacktraces.
README.md
Outdated
@@ -47,13 +41,35 @@ foreach ($deprecations as $identifier => $count) { | |||
} | |||
``` | |||
|
|||
### Supressing Specifc Deprecations |
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.
2 typos in the tile: Suppressing
and Specific
README.md
Outdated
avoid side effects by deprecations on user error handlers that Doctrine has no | ||
control over. | ||
- no side-effects by default, making it a perfect fit for libraries that don't know how the error handler works they operate under | ||
- options to avoid having to rely on global state entirely with PSR-3 logging |
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 misleading. The configured PSR-3 logger is still configured globally.
README.md
Outdated
``` | ||
|
||
Disable triggering about specific deprecations: | ||
If you only want to enable depreaction tracking, without logging or calling `trigger_error` then call: |
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.
typo here in deprecation
triggerIfCalledFromOutside
.trigger_error
based mode and only use@trigger_error
, refactor tests to use a custom error handler for assertions.@trigger_error