Skip to content

Commit 5c96cbd

Browse files
Fix getting the name of closures on PHP 8.1.11+
1 parent 86b49fe commit 5c96cbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Command/DebugFirewallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ private function formatCallable($callable): string
255255
if (false !== strpos($r->name, '{closure}')) {
256256
return 'Closure()';
257257
}
258-
if ($class = $r->getClosureScopeClass()) {
258+
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
259259
return sprintf('%s::%s()', $class->name, $r->name);
260260
}
261261

0 commit comments

Comments
 (0)