Skip to content

Commit a1d07a9

Browse files
bug symfony#31962 Fix reporting unsilenced deprecations from insulated tests (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- Fix reporting unsilenced deprecations from insulated tests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Introduced while fixing CS in batch. Commits ------- 48093f4 Fix reporting unsilenced deprecations from insulated tests
2 parents db91042 + 48093f4 commit a1d07a9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ public function endTest($test, $time)
284284
foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) {
285285
$error = serialize(array('deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false), 'triggering_file' => isset($deprecation[2]) ? $deprecation[2] : null));
286286
if ($deprecation[0]) {
287-
@trigger_error($error, E_USER_DEPRECATED);
287+
// unsilenced on purpose
288+
trigger_error($error, E_USER_DEPRECATED);
288289
} else {
289290
@trigger_error($error, E_USER_DEPRECATED);
290291
}

src/Symfony/Component/BrowserKit/Client.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ protected function doRequestInProcess($request)
361361
unlink($deprecationsFile);
362362
foreach ($deprecations ? unserialize($deprecations) : [] as $deprecation) {
363363
if ($deprecation[0]) {
364-
@trigger_error($deprecation[1], E_USER_DEPRECATED);
364+
// unsilenced on purpose
365+
trigger_error($deprecation[1], E_USER_DEPRECATED);
365366
} else {
366367
@trigger_error($deprecation[1], E_USER_DEPRECATED);
367368
}

0 commit comments

Comments
 (0)