Skip to content

Commit 28ceddd

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: [Serializer] Readd AdvancedNameConverterInterface to MetadataAwareNameConverter. [PropertyInfo] Fix bigint extraction with type info silence warnings issued by Redis Sentinel on connection issues
2 parents 082c586 + 8fb59cc commit 28ceddd

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function getType(string $class, string $property, array $context = []): ?
133133

134134
// DBAL 4 has a special fallback strategy for BINGINT (int -> string)
135135
if (Types::BIGINT === $typeOfField && !method_exists(BigIntType::class, 'getName')) {
136-
return Type::collection(Type::int(), Type::string());
136+
return $nullable ? Type::nullable(Type::union(Type::int(), Type::string())) : Type::union(Type::int(), Type::string());
137137
}
138138

139139
$enumType = null;

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public static function typeProvider(): iterable
286286
{
287287
// DBAL 4 has a special fallback strategy for BINGINT (int -> string)
288288
if (!method_exists(BigIntType::class, 'getName')) {
289-
$expectedBigIntType = Type::collection(Type::int(), Type::string());
289+
$expectedBigIntType = Type::union(Type::int(), Type::string());
290290
} else {
291291
$expectedBigIntType = Type::string();
292292
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra
252252
} else {
253253
$extra = $passAuth ? [$params['auth']] : [];
254254

255-
$sentinel = new $sentinelClass($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra);
255+
$sentinel = @new $sentinelClass($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra);
256256
}
257257

258-
if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) {
258+
if ($address = @$sentinel->getMasterAddrByName($params['redis_sentinel'])) {
259259
[$host, $port] = $address;
260260
}
261261
} catch (\RedisException|\Relay\Exception $redisException) {

src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ public function __construct(array $options, \Redis|Relay|\RedisCluster|null $red
142142

143143
$sentinel = new \RedisSentinel($params);
144144
} else {
145-
$sentinel = new $sentinelClass($host, $port, $options['timeout'], $options['persistent_id'], $options['retry_interval'], $options['read_timeout']);
145+
$sentinel = @new $sentinelClass($host, $port, $options['timeout'], $options['persistent_id'], $options['retry_interval'], $options['read_timeout']);
146146
}
147147

148-
if ($address = $sentinel->getMasterAddrByName($sentinelMaster)) {
148+
if ($address = @$sentinel->getMasterAddrByName($sentinelMaster)) {
149149
[$host, $port] = $address;
150150
}
151151
} catch (\RedisException|\Relay\Exception $redisException) {

src/Symfony/Component/Serializer/NameConverter/MetadataAwareNameConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* @author Fabien Bourigault <bourigaultfabien@gmail.com>
2020
*/
21-
final class MetadataAwareNameConverter implements NameConverterInterface
21+
final class MetadataAwareNameConverter implements AdvancedNameConverterInterface
2222
{
2323
/**
2424
* @var array<string, array<string, string|null>>

0 commit comments

Comments
 (0)