Skip to content

Commit 37e98c7

Browse files
smnandrenicolas-grekas
authored andcommitted
[String] Fix folded in compat mode
1 parent ac30c7e commit 37e98c7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/String/AbstractUnicodeString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function folded(bool $compat = true): parent
195195

196196
if (!$compat || \PHP_VERSION_ID < 70300 || !\defined('Normalizer::NFKC_CF')) {
197197
$str->string = normalizer_normalize($str->string, $compat ? \Normalizer::NFKC : \Normalizer::NFC);
198-
$str->string = mb_strtolower(str_replace(self::FOLD_FROM, self::FOLD_TO, $this->string), 'UTF-8');
198+
$str->string = mb_strtolower(str_replace(self::FOLD_FROM, self::FOLD_TO, $str->string), 'UTF-8');
199199
} else {
200200
$str->string = normalizer_normalize($str->string, \Normalizer::NFKC_CF);
201201
}

src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,10 @@ public static function provideBeforeAfterLastIgnoreCase(): array
470470
);
471471
}
472472

473-
public static function provideToFoldedCase(): array
473+
public static function provideFolded(): array
474474
{
475475
return array_merge(
476-
parent::provideToFoldedCase(),
476+
parent::provideFolded(),
477477
[
478478
['déjà', 'DéjÀ'],
479479
['σσσ', 'Σσς'],

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy