Skip to content

Commit bc54e0b

Browse files
[travis] use PHP 8.0 to patch return types and run deps=low
1 parent 082fd04 commit bc54e0b

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
@@ -82,7 +82,9 @@ public function __construct($message, array $trace, $file)
8282
$this->message = $parsedMsg['deprecation'];
8383
$this->originClass = $parsedMsg['class'];
8484
$this->originMethod = $parsedMsg['method'];
85-
$this->originalFilesStack = $parsedMsg['files_stack'];
85+
if (isset($parsedMsg['files_stack'])) {
86+
$this->originalFilesStack = $parsedMsg['files_stack'];
87+
}
8688
// If the deprecation has been triggered via
8789
// \Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait::endTest()
8890
// 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
@@ -260,7 +260,7 @@ public function endTest($test, $time)
260260
unlink($this->runsInSeparateProcess);
261261
putenv('SYMFONY_DEPRECATIONS_SERIALIZE');
262262
foreach ($deprecations ? unserialize($deprecations) : [] as $deprecation) {
263-
$error = serialize(['deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false), 'triggering_file' => isset($deprecation[2]) ? $deprecation[2] : null]);
263+
$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] : []]);
264264
if ($deprecation[0]) {
265265
// unsilenced on purpose
266266
trigger_error($error, \E_USER_DEPRECATED);

0 commit comments

Comments
 (0)