Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf534166

Browse files
committed
Fixed:TraceableMessageBus can now be used in conjunction with callbacks
To be on the safe side, also removed `compact()` usage, which was making everythingmuch muddier and harder to comprehend.
1 parent8e249c2 commitf534166

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎src/Symfony/Component/Messenger/TraceableMessageBus.php‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ private function getCaller(): array
6262
{
6363
$trace =debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS,8);
6464

65-
$file =$trace[1]['file'];
66-
$line =$trace[1]['line'];
65+
$file =$trace[1]['file'] ??null;
66+
$line =$trace[1]['line'] ??null;
6767

6868
$handleTraitFile = (new \ReflectionClass(HandleTrait::class))->getFileName();
6969
$found =false;
@@ -97,9 +97,12 @@ private function getCaller(): array
9797
}
9898
}
9999

100-
$name =str_replace('\\','/',$file);
101-
$name =substr($name,strrpos($name,'/') +1);
100+
$name =str_replace('\\','/', (string)$file);
102101

103-
returncompact('name','file','line');
102+
return [
103+
'name' =>substr($name,strrpos($name,'/') +1),
104+
'file' =>$file,
105+
'line' =>$line,
106+
];
104107
}
105108
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp