Skip to content

fix(serializer): disable normalizer cache to prevent wrong normalizer in worker mode#7873

Open
soyuka wants to merge 1 commit intoapi-platform:4.3from
soyuka:fix/7868
Open

fix(serializer): disable normalizer cache to prevent wrong normalizer in worker mode#7873
soyuka wants to merge 1 commit intoapi-platform:4.3from
soyuka:fix/7868

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Mar 24, 2026

Q A
Branch? main
Tickets Closes #7868
License MIT
Doc PR
  • Change getSupportedTypes() from ['object' => true] to ['object' => false] so supportsNormalization() is called fresh each time with current context
  • In FrankenPHP worker mode, the stale cache caused ItemNormalizer to incorrectly handle output DTOs appearing as nested objects in other resources

… in worker mode (api-platform#7868)

| Q             | A
| ------------- | ---
| Branch?       | main
| Tickets       | Closes api-platform#7868
| License       | MIT
| Doc PR        | ∅

* Change getSupportedTypes() from ['object' => true] to ['object' => false]
  so supportsNormalization() is called fresh each time with current context
* In FrankenPHP worker mode, the stale cache caused ItemNormalizer to
  incorrectly handle output DTOs appearing as nested objects in other resources
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.

1 participant