Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(serializer): read groups off the root operation #5196

Merged
merged 4 commits into from Nov 18, 2022

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Nov 17, 2022

Q A
Branch? 2.7
Tickets n/a
License MIT
Doc PR n/a
#[ApiResource(
    provider: [RelationGroupImpactOnCollection::class, 'getData'],
    operations: [
        new GetCollection(),
        new Get(normalizationContext: ['groups' => 'related']),
    ]
)]

When using this declaration, we expect the groups to be active only on the Get operation but right now they're also active on the GetCollection.

@soyuka soyuka merged commit ebaad51 into api-platform:2.7 Nov 18, 2022
@soyuka soyuka deleted the fix-bug-serialization-27 branch November 21, 2022 09:30
soyuka added a commit to soyuka/core that referenced this pull request Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants