Skip to content

Unknown parameter error when using optional, named, variadic parameters #4800

@Khartir

Description

@Khartir

Bug report

When using named arguments while calling a function that has both optional and variadic parameters PHPstan reports unknown parameters when not all of the optional parameters are used to call the function.

Code snippet that reproduces the problem

https://phpstan.org/r/993fc76c-dd25-46ca-b607-0dbcd2105b5b

Expected output

No errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions