8000 Merge branch '6.4' into 7.0 · symfony/symfony@8debf88 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8debf88

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Safeguard dynamic access to Doctrine metadata properties Enhance error handling in StaticPrefixCollection for compatibility with libpcre2-10.43
2 parents b8efddb + 3e296f1 commit 8debf88

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private static function getRealClass(string $class): string
195195
private static function getMappingValue(array|JoinColumnMapping $mapping, string $key): mixed
196196
{
197197
if ($mapping instanceof JoinColumnMapping) {
198-
return $mapping->$key;
198+
return $mapping->$key ?? null;
199199
}
200200

201201
return $mapping[$key] ?? null;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ private function getPhpType(string $doctrineType): ?string
279279
private static function getMappingValue(array|AssociationMapping|EmbeddedClassMapping|FieldMapping|JoinColumnMapping $mapping, string $key): mixed
280280
{
281281
if ($mapping instanceof AssociationMapping || $mapping instanceof EmbeddedClassMapping || $mapping instanceof FieldMapping || $mapping instanceof JoinColumnMapping) {
282-
return $mapping->$key;
282+
return $mapping->$key ?? null;
283283
}
284284

285285
return $mapping[$key] ?? null;

src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private function getExistingUniqueFields(ClassMetadata $metadata): array
137137
private static function getFieldMappingValue(array|FieldMapping $mapping, string $key): mixed
138138
{
139139
if ($mapping instanceof FieldMapping) {
140-
return $mapping->$key;
140+
return $mapping->$key ?? null;
141141
}
142142

143143
return $mapping[$key] ?? null;

src/Symfony/Component/Routing/Matcher/Dumper/StaticPrefixCollection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ private function getCommonPrefix(string $prefix, string $anotherPrefix): array
198198

199199
public static function handleError(int $type, string $msg): bool
200200
{
201-
return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length');
201+
return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length')
202+
|| str_contains($msg, 'Compilation failed: length of lookbehind assertion is not limited');
202203
}
203204
}

0 commit comments

Comments
 (0)
0