Skip to content

[Serializer] MetadataAwareNameConverter break groups parameters #34455

@gilles-g

Description

@gilles-g

Symfony version(s) affected: 4.3.7

Description
Since #34035, cannot denormalize with that syntax ['groups' => 'user']

How to reproduce

$obj = $normalizer->denormalize(['bar' => 'Api Platform'], Foo::class, null, ['groups' => 'user']);

-->

/**
In MetadataAwareNameConverter.php line 126:
                                                                                 
Warning: array_intersect(): Expected parameter 2 to be an array, string given
*/

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Serializer/NameConverter/MetadataAwareNameConverter.php#L126

Possible Solution

@antograssiot If you could have a look at this

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions