Skip to content

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.

4 participants