Skip to content

Commit 5cfc1f3

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Fix incompatibility between security-bundle 6.4 and security-http 7.0 [String] Update wcswidth data with Unicode 15.1 [FrameworkBundle] no serializer mapping cache in debug mode without enable_annotations [Cache] fix using multiple Redis Sentinel hosts when the first one is not resolvable
2 parents bc82d59 + 1708789 commit 5cfc1f3

File tree

6 files changed

+33
-12
lines changed

6 files changed

+33
-12
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,16 +1818,16 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
18181818
$container->removeDefinition('serializer.normalizer.mime_message');
18191819
}
18201820

1821+
if ($container->getParameter('kernel.debug')) {
1822+
$container->removeDefinition('serializer.mapping.cache_class_metadata_factory');
1823+
}
1824+
18211825
if (!class_exists(Translator::class)) {
18221826
$container->removeDefinition('serializer.normalizer.translatable');
18231827
}
18241828

18251829
$serializerLoaders = [];
18261830
if (isset($config['enable_attributes']) && $config['enable_attributes']) {
1827-
if ($container->getParameter('kernel.debug')) {
1828-
$container->removeDefinition('serializer.mapping.cache_class_metadata_factory');
1829-
}
1830-
18311831
$annotationLoader = new Definition(AnnotationLoader::class);
18321832

18331833
$serializerLoaders[] = $annotationLoader;

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,12 @@ public function testSerializerCacheActivated()
15481548
public function testSerializerCacheUsedWithoutAnnotationsAndMappingFiles()
15491549
{
15501550
$container = $this->createContainerFromFile('serializer_mapping_without_annotations', ['kernel.debug' => true, 'kernel.container_class' => __CLASS__]);
1551+
$this->assertFalse($container->hasDefinition('serializer.mapping.cache_class_metadata_factory'));
1552+
}
1553+
1554+
public function testSerializerCacheUsedWithoutAnnotationsAndMappingFilesNoDebug()
1555+
{
1556+
$container = $this->createContainerFromFile('serializer_mapping_without_annotations', ['kernel.debug' => false, 'kernel.container_class' => __CLASS__]);
15511557
$this->assertTrue($container->hasDefinition('serializer.mapping.cache_class_metadata_factory'));
15521558
}
15531559

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,11 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra
227227
}
228228
$sentinel = new $sentinelClass($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra);
229229

230-
if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) {
231-
[$host, $port] = $address;
230+
try {
231+
if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) {
232+
[$host, $port] = $address;
233+
}
234+
} catch (\RedisException $e) {
232235
}
233236
} while (++$hostIndex < \count($hosts) && !$address);
234237

src/Symfony/Component/String/Resources/WcswidthDataGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private function writeWideWidthData(): void
4646

4747
$version = $matches[1];
4848

49-
if (!preg_match_all('/^([A-H\d]{4,})(?:\.\.([A-H\d]{4,}))?;[W|F]/m', $content, $matches, \PREG_SET_ORDER)) {
49+
if (!preg_match_all('/^([A-H\d]{4,})(?:\.\.([A-H\d]{4,}))? +; [W|F]/m', $content, $matches, \PREG_SET_ORDER)) {
5050
throw new RuntimeException('The wide width pattern did not match anything.');
5151
}
5252

src/Symfony/Component/String/Resources/data/wcswidth_table_wide.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/*
44
* This file has been auto-generated by the Symfony String Component for internal use.
55
*
6-
* Unicode version: 15.0.0
7-
* Date: 2022-10-05T17:16:36+02:00
6+
* Unicode version: 15.1.0
7+
* Date: 2023-09-13T11:47:12+00:00
88
*/
99

1010
return [
@@ -166,7 +166,7 @@
166166
],
167167
[
168168
12272,
169-
12283,
169+
12287,
170170
],
171171
[
172172
12288,
@@ -396,6 +396,10 @@
396396
12736,
397397
12771,
398398
],
399+
[
400+
12783,
401+
12783,
402+
],
399403
[
400404
12784,
401405
12799,
@@ -1110,6 +1114,14 @@
11101114
],
11111115
[
11121116
191457,
1117+
191471,
1118+
],
1119+
[
1120+
191472,
1121+
192093,
1122+
],
1123+
[
1124+
192094,
11131125
194559,
11141126
],
11151127
[

src/Symfony/Component/String/Resources/data/wcswidth_table_zero.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/*
44
* This file has been auto-generated by the Symfony String Component for internal use.
55
*
6-
* Unicode version: 15.0.0
7-
* Date: 2022-10-05T17:16:37+02:00
6+
* Unicode version: 15.1.0
7+
* Date: 2023-09-13T11:47:13+00:00
88
*/
99

1010
return [

0 commit comments

Comments
 (0)