Skip to content

Commit 0a6a44a

Browse files
Adjust pretty name of closures on PHP 8.4
1 parent 7a69a85 commit 0a6a44a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Debug/WrappedListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct($listener, ?string $name, Stopwatch $stopwatch, ?Eve
4747
$this->pretty = $this->name.'::'.$listener[1];
4848
} elseif ($listener instanceof \Closure) {
4949
$r = new \ReflectionFunction($listener);
50-
if (str_contains($r->name, '{closure}')) {
50+
if (str_contains($r->name, '{closure')) {
5151
$this->pretty = $this->name = 'closure';
5252
} elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
5353
$this->name = $class->name;

0 commit comments

Comments
 (0)