-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PhpUnitBridge] optional error handler arguments #22817
8000 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
[PhpUnitBridge] optional error handler arguments #22817
Conversation
Q | A |
---|---|
Branch? | 2.7 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | https://travis-ci.org/symfony/symfony/jobs/234483755#L2460 |
License | MIT |
Doc PR |
@@ -49,7 +49,7 @@ public static function register($mode = false) | |||
'legacy' => array(), | |||
'other' => array(), | |||
); | |||
$deprecationHandler = function ($type, $msg, $file, $line, $context) use (&$deprecations, $getMode) { | |||
$deprecationHandler = function ($type, $msg, $file = null, $line = null, $context = array()) use (&$deprecations, $getMode) { |
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.
AFAIK, only $context is "optional" (because it's use has been deprecated in 7.2)
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 what the PHP documentation says:
The third parameter is optional, errfile, which contains the filename that the error was raised in, as a string.
[...]
The fourth parameter is optional, errline, which contains the line number the error was raised at, as an integer.
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.
but this never happens, see Debug which has no issue having them mandatory (and all examples I found into the wild I now about)
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.
Fair enough, let's only change the $context
argument here. We can challenge the decision in the future anyway if someone can point us to an issue related to it.
47935ac
to
f7d1a06
Compare
Thank you @xabbuh. |
This PR was merged into the 2.7 branch. Discussion ---------- [PhpUnitBridge] optional error handler arguments | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | https://travis-ci.org/symfony/symfony/jobs/234483755#L2460 | License | MIT | Doc PR | Commits ------- f7d1a06 respect optional error handler arguments