8000 minor #24551 [PhpUnitBridge] fix serialized deprecations handling (xa… · symfony/symfony@be9382a · GitHub
[go: up one dir, main page]

Skip to content

Commit be9382a

Browse files
com 8000 mitted
minor #24551 [PhpUnitBridge] fix serialized deprecations handling (xabbuh)
This PR was merged into the 3.3 branch. Discussion ---------- [PhpUnitBridge] fix serialized deprecations handling | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 2f5a0bd fix serialized deprecations handling
2 parents 17b48ed + 2f5a0bd commit be9382a

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