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 {