Skip to content

Option class argument in service treated as missing with a warning. #485

@kherge

Description

@kherge

The last argument in one of my classes has a default value.

class MyService
{
    public function __construct(Interface1 $arg1, Interface2 $arg2, $arg3 = 123)
    {
    }
}

However, when I add it as service in the XML configuration file and only pass the first two parameters, I get a warning that the third argument is missing.

This should not be a warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions