Skip to content

Commit

Permalink
Come to think of it, $errcontext is deprecated in PHP 7.2 and one sho…
Browse files Browse the repository at this point in the history
…uld no rely on it. We do no rely on it so we can safely remove it.
  • Loading branch information
sebastianbergmann committed Feb 8, 2019
1 parent 0350e89 commit 2ac6c94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Framework/TestCase.php
Expand Up @@ -792,8 +792,7 @@ public function run(TestResult $result = null): TestResult
'isStrictAboutResourceUsageDuringSmallTests' => $isStrictAboutResourceUsageDuringSmallTests,
'codeCoverageFilter' => $codeCoverageFilter,
'configurationFilePath' => $configurationFilePath,
'name' => $this->getName(false),
'errcontext' => \PHP_MAJOR_VERSION < 8 ? ', $errcontext' : ''
'name' => $this->getName(false)
];

if (!$runEntireClass) {
Expand Down
2 changes: 1 addition & 1 deletion src/Util/PHP/Template/TestCaseClass.tpl.dist
Expand Up @@ -87,7 +87,7 @@ if ('' !== $configurationFilePath) {
unset($configuration);
}

function __phpunit_error_handler($errno, $errstr, $errfile, $errline{errcontext})
function __phpunit_error_handler($errno, $errstr, $errfile, $errline)
{
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Util/PHP/Template/TestCaseMethod.tpl.dist
Expand Up @@ -90,7 +90,7 @@ if ('' !== $configurationFilePath) {
unset($configuration);
}

function __phpunit_error_handler($errno, $errstr, $errfile, $errline{errcontext})
function __phpunit_error_handler($errno, $errstr, $errfile, $errline)
{
return true;
}
Expand Down

0 comments on commit 2ac6c94

Please sign in to comment.