Skip to content

Commit

Permalink
Fix getting the name of closures on PHP 8.1.11+
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Dec 12, 2022
1 parent 86b49fe commit 5c96cbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Command/DebugFirewallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private function formatCallable($callable): string
if (false !== strpos($r->name, '{closure}')) {
return 'Closure()';
}
if ($class = $r->getClosureScopeClass()) {
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
return sprintf('%s::%s()', $class->name, $r->name);
}

Expand Down

0 comments on commit 5c96cbd

Please sign in to comment.