8000 Add the special '*' serialization group · symfony/symfony@370f2c6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 370f2c6

Browse files
Add the special '*' serialization group
1 parent 704c648 commit 370f2c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ protected function getAllowedAttributes($classOrObject, array $context, bool $at
250250
// If you update this check, update accordingly the one in Symfony\Component\PropertyInfo\Extractor\SerializerExtractor::getProperties()
251251
if (
252252
!$ignore &&
253-
(false === $groups || array_intersect($attributeMetadata->getGroups(), $groups)) &&
253+
(false === $groups || array_intersect(array_merge($attributeMetadata->getGroups(), ['*']), $groups)) &&
254254
$this->isAllowedAttribute($classOrObject, $name = $attributeMetadata->getName(), null, $context)
255255
) {
256256
$allowedAttributes[] = $attributesAsString ? $name : $attributeMetadata;

0 commit comments

Comments
 (0)
0