Please sign in to comment.
feature #28669 [Serializer] Object class resolver (alanpoulain)
This PR was squashed before being merged into the 4.2-dev branch (closes #28669). Discussion ---------- [Serializer] Object class resolver | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | When normalizing an object, it could be useful to use a custom method to resolve the class name of it instead of using `get_class`. For instance, Doctrine is using proxy classes for lazy-loading and we usually want the real class and not the proxied one. That's why we are using this trait in API Platform: https://github.com/api-platform/core/blob/master/src/Util/ClassInfoTrait.php With this feature, we could solve an issue in API Platform with the JSON-LD normalizer when the eager fetching is disabled. Commits ------- 18d2143 [Serializer] Object class resolver
- Loading branch information...
Showing with 9 additions and 5 deletions.