Skip to content

Commit b953038

Browse files
Merge branch '5.1' into 5.2
* 5.1: µCS fix CS fix CS fix [travis] use PHP 8.0 to patch return types and run deps=low Add me as a Notifier code owner Update sl_SI translations Don't trigger deprecation for deprecated aliases pointing to deprecated definitions [HttpFoundation] use atomic writes in MockFileSessionStorage Make EmailMessage & SmsMessage transport nullable remove unused argument [DI] fix param annotation [Config] Add \Symfony\Component\Config\Loader::load() return type Simplify PHP CS Fixer config Rename normalize param
2 parents 586e1ac + 5be6662 commit b953038

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

DeprecationErrorHandler/Deprecation.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ public function __construct($message, array $trace, $file)
8787
$this->message = $parsedMsg['deprecation'];
8888
$this->originClass = $parsedMsg['class'];
8989
$this->originMethod = $parsedMsg['method'];
90-
$this->originalFilesStack = $parsedMsg['files_stack'];
90+
if (isset($parsedMsg['files_stack'])) {
91+
$this->originalFilesStack = $parsedMsg['files_stack'];
92+
}
9193
// If the deprecation has been triggered via
9294
// \Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait::endTest()
9395
// then we need to use the serialized information to determine

Legacy/SymfonyTestsListenerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public function endTest($test, $time)
280280
unlink($this->runsInSeparateProcess);
281281
putenv('SYMFONY_DEPRECATIONS_SERIALIZE');
282282
foreach ($deprecations ? unserialize($deprecations) : [] as $deprecation) {
283-
$error = serialize(['deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false), 'triggering_file' => isset($deprecation[2]) ? $deprecation[2] : null]);
283+
$error = serialize(['deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false), 'triggering_file' => isset($deprecation[2]) ? $deprecation[2] : null, 'files_stack' => isset($deprecation[3]) ? $deprecation[3] : []]);
284284
if ($deprecation[0]) {
285285
// unsilenced on purpose
286286
trigger_error($error, \E_USER_DEPRECATED);

0 commit comments

Comments
 (0)