Skip to content

Add a #[ParameterName] attribute #20822

@geek-merlin

Description

@geek-merlin

Description

Problem

When calling parameters by name, the name is locked to the variable name.

Approach

Use an attribute to unlock that.

Example

function foo(#[ParameterName('service_id')] string $serviceId) {...}
foo(service_id: 'logger');

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