Skip to content

Commit

Permalink
bug #31962 Fix reporting unsilenced deprecations from insulated tests…
Browse files Browse the repository at this point in the history
… (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
  • Loading branch information
nicolas-grekas committed Jun 9, 2019
2 parents db91042 + 48093f4 commit a1d07a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -284,7 +284,8 @@ public function endTest($test, $time)
foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) {
$error = serialize(array('deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false), 'triggering_file' => isset($deprecation[2]) ? $deprecation[2] : null));
if ($deprecation[0]) {
@trigger_error($error, E_USER_DEPRECATED);
// unsilenced on purpose
trigger_error($error, E_USER_DEPRECATED);
} else {
@trigger_error($error, E_USER_DEPRECATED);
}
Expand Down
3 changes: 2 additions & 1 deletion src/Symfony/Component/BrowserKit/Client.php
Expand Up @@ -361,7 +361,8 @@ protected function doRequestInProcess($request)
unlink($deprecationsFile);
foreach ($deprecations ? unserialize($deprecations) : [] as $deprecation) {
if ($deprecation[0]) {
@trigger_error($deprecation[1], E_USER_DEPRECATED);
// unsilenced on purpose
trigger_error($deprecation[1], E_USER_DEPRECATED);
} else {
@trigger_error($deprecation[1], E_USER_DEPRECATED);
}
Expand Down

0 comments on commit a1d07a9

Please sign in to comment.