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: prevents recomputing normalizationcontext #6700

Open
wants to merge 1 commit into
base: 3.4
Choose a base branch
from

Conversation

maxhelias
Copy link
Contributor

Q A
Branch? 3.4
Tickets #6693
License MIT
Doc PR -

Add a check and use the previously computed context

@maxhelias maxhelias changed the base branch from main to 3.4 October 7, 2024 12:36
@maxhelias maxhelias force-pushed the prevents-recomputing-normalizationcontext branch from 9edd9c5 to a72505e Compare October 7, 2024 12:37
@maxhelias maxhelias force-pushed the prevents-recomputing-normalizationcontext branch from a72505e to 413dd77 Compare October 7, 2024 12:43
'resource_class' => $class,
'operation' => $operation,
]);
if (null === ($serializerContext = $request->attributes->get('_api_normalization_context'))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we move the responsibility of this to the SerializerContextBuilder directly? It'd avoid duplicating this condition. I'd also do the set there.

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.

2 participants