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

[Serializer] Use default context EXCLUDE_FROM_CACHE_KEY for unsetting OBJECT_TO_POPULATE #36363

Conversation

alanpoulain
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets N/A
License MIT
Doc PR N/A

Following #36332, instead of unsetting directly the OBJECT_TO_POPULATE key from the context in getCacheKey, we can add the key to the EXCLUDE_FROM_CACHE_KEY array of the default context for Symfony >= 4.4.

@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Apr 10, 2020
@nicolas-grekas nicolas-grekas force-pushed the serializer-fix-cache-key-unitialized-properties-default-context branch from dd38271 to 8d9a1b6 Compare September 2, 2020 15:37
@nicolas-grekas
Copy link
Member

I think we should reject this PR:

  1. it has a BC breaking potential (merging it for ppl that set the EXCLUDE_FROM_CACHE_KEY key will not unset(OBJECT_TO_POPULATE) anymore).
  2. nobody complained that it could not use the OBJECT_TO_POPULATE as part of the cache key (I fail to see what the use case would be).

@dunglas
Copy link
Member

dunglas commented Sep 2, 2020

I agree with @nicolas-grekas, let's close for now. We can still do it in a new PR if it becomes necessary at some point. Thanks for contributing @alanpoulain!

@dunglas dunglas closed this Sep 2, 2020
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.

None yet

4 participants