From 2f5a0bd72f8f606230aac3920ed810f206884ad9 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 13 Oct 2017 16:04:01 +0200 Subject: [PATCH] fix serialized deprecations handling --- .../Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php index 166c44a3f8..4d9b48dfc7 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php @@ -260,7 +260,9 @@ class SymfonyTestsListenerTrait } if ($this->runsInSeparateProcess) { - foreach (unserialize(file_get_contents($this->runsInSeparateProcess)) as $deprecation) { + $deprecations = file_get_contents($this->runsInSeparateProcess); + unlink($this->runsInSeparateProcess); + foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) { if ($deprecation[0]) { trigger_error($deprecation[1], E_USER_DEPRECATED); } else {