Skip to content

Commit bd60612

Browse files
committed
bug #60958 [Serializer] remove return type from AbstractObjectNormalizer::getAllowedAttributes() (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- [Serializer] remove return type from `AbstractObjectNormalizer::getAllowedAttributes()` | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #60957 | License | MIT Commits ------- b58fa26 remove return type from AbstractObjectNormalizer::getAllowedAttributes()
2 parents 326a195 + b58fa26 commit bd60612

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/expected-missing-return-types.diff

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11594,6 +11594,13 @@ diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalize
1159411594
+ abstract protected function setAttributeValue(object $object, string $attribute, mixed $value, ?string $format = null, array $context = []): void;
1159511595

1159611596
/**
11597+
@@ -767,5 +767,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
11598+
}
11599+
11600+
- protected function getAllowedAttributes(string|object $classOrObject, array $context, bool $attributesAsString = false)
11601+
+ protected function getAllowedAttributes(string|object $classOrObject, array $context, bool $attributesAsString = false): array|bool
11602+
{
11603+
if (false === $allowedAttributes = parent::getAllowedAttributes($classOrObject, $context, $attributesAsString)) {
1159711604
diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php
1159811605
--- a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php
1159911606
+++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php

src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ protected function createChildContext(array $parentContext, string $attribute, ?
766766
return $context;
767767
}
768768

769-
protected function getAllowedAttributes(string|object $classOrObject, array $context, bool $attributesAsString = false): array|bool
769+
protected function getAllowedAttributes(string|object $classOrObject, array $context, bool $attributesAsString = false)
770770
{
771771
if (false === $allowedAttributes = parent::getAllowedAttributes($classOrObject, $context, $attributesAsString)) {
772772
return false;

0 commit comments

Comments
 (0)