From e710b3750f5ca8547198ecb3ebfc9169ee6b5688 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 19 Nov 2024 18:05:21 +0100 Subject: [PATCH 1/2] Adjust pretty name of closures on PHP 8.4 (#6351) related to https://github.com/php/php-src/pull/13550 see analog symfony change: https://github.com/symfony/symfony/pull/54614 --- src/utils/Utils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/Utils.php b/src/utils/Utils.php index 46d673216..ef3f2d249 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -80,7 +80,7 @@ use function preg_match_all; use function preg_replace; use function shell_exec; use function spl_object_id; -use function str_ends_with; +use function str_contains; use function str_pad; use function str_split; use function str_starts_with; @@ -121,7 +121,7 @@ final class Utils{ */ public static function getNiceClosureName(\Closure $closure) : string{ $func = new \ReflectionFunction($closure); - if(!str_ends_with($func->getName(), '{closure}')){ + if(!str_contains($func->getName(), '{closure')){ //closure wraps a named function, can be done with reflection or fromCallable() //isClosure() is useless here because it just tells us if $func is reflecting a Closure object From bf7a53b00ff4a7f0ac47a405ec32b40afac37de8 Mon Sep 17 00:00:00 2001 From: "Dylan T." Date: Tue, 19 Nov 2024 17:47:46 +0000 Subject: [PATCH 2/2] Update api-change-request.md [ci skip] --- .github/ISSUE_TEMPLATE/api-change-request.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/api-change-request.md b/.github/ISSUE_TEMPLATE/api-change-request.md index 615ab12ef..e3d24ea0f 100644 --- a/.github/ISSUE_TEMPLATE/api-change-request.md +++ b/.github/ISSUE_TEMPLATE/api-change-request.md @@ -7,13 +7,13 @@ assignees: '' --- - -## Description + +## Problem description - -## Justification + +## Proposed solution -## Alternative methods +## Alternative solutions that don't require API changes