Skip to content

Commit fa8e654

Browse files
Adjust pretty name of closures on PHP 8.4
1 parent 411190c commit fa8e654

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
@@ -252,7 +252,7 @@ private function formatCallable($callable): string
252252

253253
if ($callable instanceof \Closure) {
254254
$r = new \ReflectionFunction($callable);
255-
if (false !== strpos($r->name, '{closure}')) {
255+
if (str_contains($r->name, '{closure')) {
256256
return 'Closure()';
257257
}
258258
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {

0 commit comments

Comments
 (0)