Skip to content

Commit a028028

Browse files
Merge branch '7.1' into 7.2
* 7.1: fix detecting anonymous exception classes on Windows and PHP 7 skip tests requiring the intl extension if it's not installed [RateLimiter] Fix DateInterval normalization re-add missing profiler shortcuts on profiler homepage Fix support for \SplTempFileObject in BinaryFileResponse [Security] Store original token in token storage when implicitly exiting impersonation [Cache] Fix clear() when using Predis
2 parents b86ce1b + 0de50ec commit a028028

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Caster/ClassStub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct(string $identifier, callable|array|string|null $call
5656
}
5757

5858
if (str_contains($identifier, "@anonymous\0")) {
59-
$this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $identifier);
59+
$this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)?[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $identifier);
6060
}
6161

6262
if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) {

Caster/ExceptionCaster.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ private static function filterExceptionArray(string $xClass, array $a, string $x
299299
unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message']);
300300

301301
if (isset($a[Caster::PREFIX_PROTECTED.'message']) && str_contains($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) {
302-
$a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $a[Caster::PREFIX_PROTECTED.'message']);
302+
$a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)?[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $a[Caster::PREFIX_PROTECTED.'message']);
303303
}
304304

305305
if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) {

0 commit comments

Comments
 (0)