8000 [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file by soerenbernstein · Pull Request #28524 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file #28524

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
Sep 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.x…
…ml file
  • Loading branch information
soerenbernstein authored and nicolas-grekas committed Sep 20, 2018
commit 3cd929bee01d2004a760a3a9abfd306e27977c7c
6 changes: 5 additions & 1 deletion src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public static function register($mode = 0)
if (false === $mode) {
$mode = getenv('SYMFONY_DEPRECATIONS_HELPER');
}
if (DeprecationErrorHandler::MODE_WEAK !== $mode && DeprecationErrorHandler::MODE_WEAK_VENDORS !== $mode && (!isset($mode[0]) || '/' !== $mode[0])) {
if (DeprecationErrorHandler::MODE_DISABLED !== $mode
&& DeprecationErrorHandler::MODE_WEAK !== $mode
&& DeprecationErrorHandler::MODE_WEAK_VENDORS !== $mode
&& (!isset($mode[0]) || '/' !== $mode[0])
) {
$mode = preg_match('/^[1-9][0-9]*$/', $mode) ? (int) $mode : 0;
}

Expand Down
0