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

Merged
merged 1 commit into from May 21, 2017

Conversation

Projects
None yet
3 participants
@xabbuh
Member

xabbuh commented May 21, 2017

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
Show outdated Hide outdated src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
@@ -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) {

This comment has been minimized.

@nicolas-grekas

nicolas-grekas May 21, 2017

Member

AFAIK, only $context is "optional" (because it's use has been deprecated in 7.2)

@nicolas-grekas

nicolas-grekas May 21, 2017

Member

AFAIK, only $context is "optional" (because it's use has been deprecated in 7.2)

This comment has been minimized.

@xabbuh

xabbuh May 21, 2017

Member

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.

@xabbuh

xabbuh May 21, 2017

Member

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.

This comment has been minimized.

@nicolas-grekas

nicolas-grekas May 21, 2017

Member

but this never happens, see Debug which has no issue having them mandatory (and all examples I found into the wild I now about)

@nicolas-grekas

nicolas-grekas May 21, 2017

Member

but this never happens, see Debug which has no issue having them mandatory (and all examples I found into the wild I now about)

This comment has been minimized.

@xabbuh

xabbuh May 21, 2017

Member

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.

@xabbuh

xabbuh May 21, 2017

Member

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.

@nicolas-grekas

This comment has been minimized.

Show comment
Hide comment
@nicolas-grekas

nicolas-grekas May 21, 2017

Member

Thank you @xabbuh.

Member

nicolas-grekas commented May 21, 2017

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit f7d1a06 into symfony:2.7 May 21, 2017

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details

nicolas-grekas added a commit that referenced this pull request May 21, 2017

bug #22817 [PhpUnitBridge] optional error handler arguments (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

@xabbuh xabbuh deleted the xabbuh:optional-error-handler-arguments branch May 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment