The Wayback Machine - https://web.archive.org/web/20220403080446/https://github.com/symfony/symfony/issues/45728
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] Allow to deserialize generic collections (do not throw away the types) #45728

Open
simPod opened this issue Mar 13, 2022 · 0 comments
Open

Comments

@simPod
Copy link
Contributor

@simPod simPod commented Mar 13, 2022

Description

I'd like to use Serializer component to deserialize json array into a generic collection.

Related:

Example

final class A
{
    /** @param \Ds\Set<MyId> $ids */
    public function __construct(
        public \Ds\Set $ids
    ) {
    }

For that, I though I'd implement my own denormalizer (ContextAwareDenormalizerInterface). However, the generic type is stripped and simplified into \Ds\Set by PropertyTypeExtractorInterface so basically it is not possible to do serde of this kind of types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.