From 3cd929bee01d2004a760a3a9abfd306e27977c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Bernstein?= Date: Thu, 20 Sep 2018 09:27:29 +0200 Subject: [PATCH] [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file --- src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index e016b40973..ff9502e23a 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -54,7 +54,11 @@ class DeprecationErrorHandler 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; }