bug #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
-------
48093f4a13
Fix reporting unsilenced deprecations from insulated tests
This commit is contained in:
commit
a1d07a99cd
@ -284,7 +284,8 @@ class SymfonyTestsListenerTrait
|
||||
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);
|
||||
}
|
||||
|
@ -361,7 +361,8 @@ abstract class Client
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user