8000 fix serialized deprecations handling · symfony/symfony@2f5a0bd · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f5a0bd

Browse files
committed
fix serialized deprecations handling
1 parent 17b48ed commit 2f5a0bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ public function endTest($test, $time)
260260
}
261261

262262
if ($this->runsInSeparateProcess) {
263-
foreach (unserialize(file_get_contents($this->runsInSeparateProcess)) as $deprecation) {
263+
$deprecations = file_get_contents($this->runsInSeparateProcess);
264+
unlink($this->runsInSeparateProcess);
265+
foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) {
264266
if ($deprecation[0]) {
265267
trigger_error($deprecation[1], E_USER_DEPRECATED);
266268
} else {

0 commit comments

Comments
 (0)
0