Skip to content

Commit fb6564a

Browse files
authored
Adjust pretty name of closures on PHP 8.4
related to php/php-src#13550 see analog symfony change: symfony/symfony#54614
1 parent fb9a74e commit fb6564a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/Utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ final class Utils{
121121
*/
122122
public static function getNiceClosureName(\Closure $closure) : string{
123123
$func = new \ReflectionFunction($closure);
124-
if(!str_ends_with($func->getName(), '{closure}')){
124+
if(!str_contains($func->getName(), '{closure')){
125125
//closure wraps a named function, can be done with reflection or fromCallable()
126126
//isClosure() is useless here because it just tells us if $func is reflecting a Closure object
127127

0 commit comments

Comments
 (0)