From 6c3c199b4e5d31dec7176f70c105202b2a0c27c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Thu, 18 Apr 2019 21:14:54 +0200 Subject: [PATCH] Treat undefined env var as strict mode An undefined SYMFONY_DEPRECATION_HELPER environment variable translates to false, and that was previously interpreted as 0, which means strict mode. This restores backwards compatibility with the previous behavior, which got broken in 1c73f9cfedad7fb7eb6ab0b1230d0219685ead0f . --- src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index a393868e9469c..0d5b78d497abe 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -241,6 +241,10 @@ private function getConfiguration() return $this->configuration = Configuration::fromNumber($mode); } + if (!$mode) { + return $this->configuration = Configuration::fromNumber(0); + } + return $this->configuration = Configuration::fromUrlEncodedString((string) $mode); }