8000 in case of use MapRequestPayload on variadic argument throw exception in RequestPayloadValueResolver · Issue #50668 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
in case of use MapRequestPayload on variadic argument throw exception in RequestPayloadValueResolver #50668
Closed
@themark147

Description

@themark147

Symfony version(s) affected

6.3.0

Description

Hi

I am creating issue based on discussion: #50661

How to reproduce

example below should thrown exception in case of variadic argument (inside RequestPayloadValueResolver)

payload

[
  {"number": 1},
  {"number": 2}
]
final class ObjectDto
{
    public function __construct(
        public readonly int $number
    )
    {
    }
}

controller

__invoke(#[MapRequestPayload] ...ObjectDto $objects)

Possible Solution

No response

Additional Context

No response

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

      0