8000 [PhpUnitBridge] optional error handler arguments by xabbuh · Pull Request #22817 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 1 commit into from
May 21, 2017

Conversation

xabbuh
Copy link
Member
@xabbuh 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

@@ -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) {
Copy link
Member

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)

Copy link
Member Author

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.

Copy link
Member

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)

Copy link
Member Author
@xabbuh xabbuh May 21, 2017

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.

@xabbuh xabbuh force-pushed the optional-error-handler-arguments branch from 47935ac to f7d1a06 Compare May 21, 2017 09:00
@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit f7d1a06 into symfony:2.7 May 21, 2017
nicolas-grekas added a commit that referenced this pull request May 21, 2017
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 optional-error-handler-arguments branch May 21, 2017 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0