Skip to content

Commit

Permalink
Adjust pretty name of closures on PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Apr 16, 2024
1 parent 411190c commit fa8e654
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 @@ -252,7 +252,7 @@ private function formatCallable($callable): string

if ($callable instanceof \Closure) {
$r = new \ReflectionFunction($callable);
if (false !== strpos($r->name, '{closure}')) {
if (str_contains($r->name, '{closure')) {
return 'Closure()';
}
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
Expand Down

0 comments on commit fa8e654

Please sign in to comment.