Skip to content

Commit 9650b00

Browse files
Merge branch '6.4' into 7.0
* 6.4: Fix CI Bump ext-redis in CI on PHP >= 8.4 Adjust pretty name of closures on PHP 8.4 implement NodeVisitorInterface instead of extending AbstractNodeVisitor sync .github/expected-missing-return-types.diff skip test assertions that are no longer valid with PHP >= 8.2.18/8.3.5
2 parents f583252 + 1eff42d commit 9650b00

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

LazyString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private static function getPrettyName(callable $callback): string
129129
} elseif ($callback instanceof \Closure) {
130130
$r = new \ReflectionFunction($callback);
131131

132-
if (str_contains($r->name, '{closure}') || !$class = $r->getClosureCalledClass()) {
132+
if (str_contains($r->name, '{closure') || !$class = $r->getClosureCalledClass()) {
133133
return $r->name;
134134
}
135135

Tests/LazyStringTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testReturnTypeError()
3939
$s = LazyString::fromCallable(fn () => []);
4040

4141
$this->expectException(\TypeError::class);
42-
$this->expectExceptionMessage('Return value of '.__NAMESPACE__.'\{closure}() passed to '.LazyString::class.'::fromCallable() must be of the type string, array returned.');
42+
$this->expectExceptionMessageMatches('{^Return value of .*\{closure.*\}\(\) passed to '.preg_quote(LazyString::class).'::fromCallable\(\) must be of the type string, array returned\.$}');
4343

4444
(string) $s;
4545
}

0 commit comments

Comments
 (0)