Skip to content

[Serializer] '*' context group serializes all properties including those without groups#21979

Open
Maxcastel wants to merge 1 commit intosymfony:6.4from
Maxcastel:serializer-context-group-62912
Open

[Serializer] '*' context group serializes all properties including those without groups#21979
Maxcastel wants to merge 1 commit intosymfony:6.4from
Maxcastel:serializer-context-group-62912

Conversation

@Maxcastel
Copy link

@Maxcastel Maxcastel commented Feb 12, 2026

While reading the documentation, I thought that '*' should only serialize properties that have at least one group, so I opened an issue on symfony/symfony (#62912)

Since the issue was closed, I’m clarifying the documentation based on the explanation provided there symfony/symfony#62912 (comment):

Additionally, the example in the documentation may be misleading. In the shown result, all properties are serialized, but in the corresponding class definition, all properties have at least one group. This makes it impossible to determine whether all properties are serialized because '*' selects all properties, or because '*' selects only properties with at least one group.

to make this behavior explicit and avoid confusion for other readers.

@Maxcastel Maxcastel force-pushed the serializer-context-group-62912 branch from e4bfb9c to 2f136d4 Compare February 12, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants