Skip to content

Add method attributes #[ParameterOrderMayChange] / #[ParameterNamesMayChange] #20178

@geek-merlin

Description

@geek-merlin

Description

#[ParameterOrderMayChange] / #[ParameterNamesMayChange]
I have seen succh a PhpDoc text comment several times on methods and used it myself too.

It would help the ecosystem a lot, if this was standardized and machine-readable.

An IDE would use it like this:

  • #[ParameterOrderMayChange] => Autocompletion suggests adding parameter names. Calls w/ un-named parameters are flagged with a warning.
  • #[ParameterNamesMayChange] => Autocompletion suggests parameters w/o names. Calls w/ named parameters are flagged with a warning.

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